package com.iwhalecloud.bss.kite.cucc.service.inf;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;

import com.iwhalecloud.bss.kite.cucc.common.callclient.constant.CallClientEnum;
import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import com.iwhalecloud.bss.hsf.baseinf.service.InfExchangeService;
import com.iwhalecloud.bss.kite.cart.common.util.KiteCartStringUtils;
import com.iwhalecloud.bss.kite.client.dto.DataResult;
import com.iwhalecloud.bss.kite.common.callclient.service.IOrderQueryService;
import com.iwhalecloud.bss.kite.common.constant.ErrorConsts;
import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.common.entity.InfService;
import com.iwhalecloud.bss.kite.common.util.JsonUtils;
import com.iwhalecloud.bss.kite.common.util.KiteListUtils;
import com.iwhalecloud.bss.kite.common.util.KiteMapUtils;
import com.iwhalecloud.bss.kite.common.util.KiteObjectUtils;
import com.iwhalecloud.bss.kite.common.util.KiteSpringUtils;
import com.iwhalecloud.bss.kite.common.util.KiteStringUtils;
import com.iwhalecloud.bss.kite.common.util.PageInfoUtils;
import com.iwhalecloud.bss.kite.cucc.client.api.attr.IUnicomRegionService;
import com.iwhalecloud.bss.kite.cucc.client.api.inf.IInfServiceBus;
import com.iwhalecloud.bss.kite.cucc.client.api.order.IAttachmentService;
import com.iwhalecloud.bss.kite.cucc.client.dto.attr.UnicomRegion;
import com.iwhalecloud.bss.kite.cucc.client.dto.customerOrderInformation.QryGrpMemberListByGrpReq;
import com.iwhalecloud.bss.kite.cucc.client.dto.devInfo.response.QueryChannelInfoSerRsp;
import com.iwhalecloud.bss.kite.cucc.client.dto.devInfo.response.QueryDeveloperInfoRespDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.goods.GoodPriceReqDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.ContractRequestDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.ExecAddressDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.KiteCartFindoopOrderReqDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.ProdInstQryDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.ResPreJudgeDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.SaleManageDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.UserQueryDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.order.VpnServiceReqDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.org.GovUserCodeRspDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.org.QryGovUserCodeReqDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.pos.KitePosAttachmentDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.pos.KitePosDTO;
import com.iwhalecloud.bss.kite.cucc.client.dto.scene.discount.CustTraderBy;
import com.iwhalecloud.bss.kite.cucc.client.dto.scene.discount.HistoryPriceData;
import com.iwhalecloud.bss.kite.cucc.client.dto.webService.CustContractRsp;
import com.iwhalecloud.bss.kite.cucc.client.dto.webService.QryIOTOppoDockingSalesRsp;
import com.iwhalecloud.bss.kite.cucc.client.enumerate.UserDetailTagName;
import com.iwhalecloud.bss.kite.cucc.common.callclient.HttpsCallClient;
import com.iwhalecloud.bss.kite.cucc.common.callclient.service.ICuccQueryInfService;
import com.iwhalecloud.bss.kite.cucc.common.constant.LocalCallClientEnum;
import com.iwhalecloud.bss.kite.cucc.common.constant.LocalInfConsts;
import com.iwhalecloud.bss.kite.cucc.common.constant.LocalKeyConsts;
import com.iwhalecloud.bss.kite.cucc.common.util.CommonUtil;
import com.iwhalecloud.bss.kite.cucc.common.util.KiteHttpsUtils;
import com.iwhalecloud.bss.kite.cucc.common.util.WebServiceUtil;
import com.iwhalecloud.bss.kite.cucc.service.util.CallClientUtils;
import com.iwhalecloud.bss.kite.cucc.service.util.FtpConfig;
import com.iwhalecloud.bss.kite.cucc.service.util.FtpUtils;
import com.iwhalecloud.bss.kite.cucc.service.util.LocalTokenUtil;
import com.iwhalecloud.bss.kite.cucc.service.util.webService.WebServiceHelper;
import com.iwhalecloud.bss.kite.dataservice.cache.DcPublicCache;
import com.iwhalecloud.bss.kite.dataservice.entity.DcPublic;
import com.iwhalecloud.bss.kite.dataservice.util.GeneralSwitchUtils;
import com.ztesoft.bss.common.bo.LoginInfo;
import com.ztesoft.bss.common.bo.OrgInfo;
import com.ztesoft.bss.common.bo.UserInfo;
import com.ztesoft.bss.common.exception.BssException;
import com.ztesoft.bss.common.util.ContextUtil;
import com.ztesoft.bss.common.util.DateUtil;
import com.ztesoft.bss.common.util.PropertiesUtil;
import com.ztesoft.bss.common.util.SpringUtil;
import com.ztesoft.bss.rlc.core.common.util.TransactionIdUtils;
import com.ztesoft.common.logger.api.ZLogger;
import com.ztesoft.common.logger.factory.ZLoggerFactory;

/**
 * @ClassName : InfServiceBus
 * @Description : 调用外中心服务总线
 * <p>该类的使命是通过业务类传过来的参数返回接口方出参的data部分，接口调用细节对业务类来说是黑盒。</p>
 * <p>接口调用失败则抛出特定异常信息com.iwhalecloud.bss.kite.common.constant.ErrorConsts.INF_INVOKE_EXCEPTION，可传入详细异常信息</p>
 * <p>有特殊情况再特殊处理</p>
 * @Author : xie.zhengjun
 * @Date : 2020/9/14 20:36
 */
@Service
@SuppressWarnings("all")
public class InfServiceBus implements IInfServiceBus {
//    @Autowired
//    InfExchangeService infExchangeService;

    private final ZLogger logger = ZLoggerFactory.getLogger(this.getClass(), KeyConsts.LOG_MODULE);

    @Value("${interface.call.mode:hsf}")
    private String mode;

    @Autowired
    private IAttachmentService attachmentService;

    public List<HistoryPriceData> listHistoryPriceData(String productId, String custName, String servId, Integer page,
                                                       Integer size) {
        Map busiMap = new HashMap();
        busiMap.put("productId", productId);
        busiMap.put("custName", custName);
        busiMap.put("servId", servId);
        busiMap.put("page", page);
        busiMap.put("size", size);
        Map result = HttpsCallClient.post(LocalCallClientEnum.QRY_CUST_PRICE, busiMap);
        DataResult<Map> data = ErrorConsts.SUCCESS.getResult(result);
        List<HistoryPriceData> hisList = new ArrayList<HistoryPriceData>();
        if (data.getResultObject() != null && !data.getResultObject().isEmpty()) {
            Map dataMap = data.getResultObject();
            JSONObject dataObjects = (JSONObject) dataMap.get("data");
            Integer total = (Integer) dataObjects.get("total");
            Integer pageNumber = (Integer) dataObjects.get("pageNumber");
            Integer pageSize = (Integer) dataObjects.get("pageSize");
            List<Map> list = (List<Map>) dataObjects.get("list");
            if (list != null && !list.isEmpty()) {
                for (Map each : list) {
                    HistoryPriceData ne = KiteMapUtils.mapToBean(each, HistoryPriceData.class);
                    hisList.add(ne);
                }
            }
        }
        return hisList;
    }

    @Override
    public List<CustTraderBy> listCustTraderBy(String productId, String custName, String servId, Integer page,
        Integer size) {
        return null;
    }

    @Override
    public  List<CustContractRsp> listContractInfo(String custId, String contractNo, String contractName,
                                                   String dataCode, String provinceCode, int pageNum, int pageSize,String cateId) {
        List<CustContractRsp> list =  new ArrayList<>();
        String code= DcPublicCache.getPCode("20211224001","ZWY");
        if(KiteStringUtils.isNotEmpty(cateId)&&KiteStringUtils.contains(code,cateId)){
            IOrderQueryService orderQueryService = SpringUtil.getBean(IOrderQueryService.class);
            InfService infService = orderQueryService
                .queryServiceBySvcCode(LocalCallClientEnum.QRY_CONTRACT_INFO.getServiceCode(),
                    LocalCallClientEnum.QRY_CONTRACT_INFO.getCenterCode());

            String reqString = WebServiceHelper
                .replaceContractReq(provinceCode, contractNo, custId, null, contractName, dataCode, null);
            try {
                // "http://10.124.150.230:8000/services/QryContractForOrderSer/v1?wsdl"
                list = WebServiceHelper.dealContractResp(WebServiceUtil
                    .invoke(reqString, SpringUtil.getBean(ICuccQueryInfService.class).getUrlByType(infService)));
            }
            catch (Exception e) {
                e.printStackTrace();
            }
        }else{
            Map<String, Object> qryCustContractInfo_REQ_BODY = new HashMap<>();
            Map<String, Object> qryCustContractInfo_REQ = new HashMap<>();
/*
        qryCustContractInfo_REQ_BODY.put("STAFF_CODE", ContextUtil.getLoginInfo().getStaffInfo().getStaffCode());
*/
            qryCustContractInfo_REQ_BODY.put("CONTRACT_NO", contractNo);

            qryCustContractInfo_REQ_BODY.put("CUST_ID", custId);

            qryCustContractInfo_REQ_BODY.put("CONTRACT_NAME", contractName);
            qryCustContractInfo_REQ_BODY.put("PROVINCE_CODE", provinceCode);
            qryCustContractInfo_REQ_BODY.put("CONTRACT_TYPE", dataCode);
            qryCustContractInfo_REQ_BODY.put("PAGE", String.valueOf(pageNum));
            qryCustContractInfo_REQ_BODY.put("SIZE", String.valueOf(pageSize));
            qryCustContractInfo_REQ.put("qryCustContractInfo_REQ_BODY",qryCustContractInfo_REQ_BODY);
            Map<String, Object> uniBssBody = new HashMap<>();
            uniBssBody.put("qryCustContractInfo_REQ", qryCustContractInfo_REQ);
            Map<String, Object> request = new HashMap<>();
            request.put("UNI_BSS_BODY", uniBssBody);
            request.put("OP_CODE", "json_chinaUnicom_govEnterprise_marketingCenter_qryContractForOrder");
            InfServiceHelper.adaptGray( request, qryCustContractInfo_REQ_BODY);

            String result;
            if (KiteStringUtils.isEqual(mode, "http")) {
                result = HttpsCallClient
                    .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
            }
            else {
                InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
                result = infExchangeService.exchange(new JSONObject(request));
            }
            if (KiteStringUtils.isBlank(result)) {
                ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
            }
            Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
            Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
            Map<String, Object> qryCustContractInfo_RSP = (Map<String, Object>) resultBodyMap.get("qryCustContractInfo_RSP");
            if ("0000".equals(KiteMapUtils.getString(qryCustContractInfo_RSP, "RSP_CODE"))) {
                Map<String, Object> RSP_DETAIL = (Map<String, Object>) qryCustContractInfo_RSP.get("RSP_DETAIL");
                list =this.dealContractResp((List<Map<String, Object>>) RSP_DETAIL.get("list"));
            }else{
                ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合同接口失败", "");
            }
        }
      /*  IOrderQueryService orderQueryService = SpringUtil.getBean(IOrderQueryService.class);
        InfService infService = orderQueryService
            .queryServiceBySvcCode(LocalCallClientEnum.QRY_CONTRACT_INFO.getServiceCode(),
                LocalCallClientEnum.QRY_CONTRACT_INFO.getCenterCode());

        String reqString = WebServiceHelper
            .replaceContractReq(provinceCode, contractNo, custId, null, contractName, dataCode, null);
        List<CustContractRsp> list = null;
        try {
            // "http://10.124.150.230:8000/services/QryContractForOrderSer/v1?wsdl"
            list = WebServiceHelper.dealContractResp(WebServiceUtil
                .invoke(reqString, SpringUtil.getBean(ICuccQueryInfService.class).getUrlByType(infService)));
        }
        catch (Exception e) {
            e.printStackTrace();
        }*/

        return list;
    }
    @Override
    public  Map<String, Object> registrationInfo(Map map, int pageNum, int pageSize) {
        List<CustContractRsp> list =  new ArrayList<>();
        Map<String, Object> QUERY_REAL_NAME_REQ = new HashMap<>();
        Map<String, Object> OPER_USER_INFO = new HashMap<>();
        OPER_USER_INFO.put("USER_CODE",KiteMapUtils.getString(map, "USER_CODE"));
        QUERY_REAL_NAME_REQ.put("CUST_ID",KiteMapUtils.getString(map, "custId"));
        QUERY_REAL_NAME_REQ.put("IS_REAL","1");
        QUERY_REAL_NAME_REQ.put("PAGE_NUM",pageNum);
        QUERY_REAL_NAME_REQ.put("PAGE_SIZE",pageSize);
        QUERY_REAL_NAME_REQ.put("TRANSACTOR_NAME",KiteMapUtils.getString(map, "TRANSACTOR_NAME"));
        QUERY_REAL_NAME_REQ.put("RESPONSIBLE_NAME",KiteMapUtils.getString(map, "RESPONSIBLE_NAME"));
        QUERY_REAL_NAME_REQ.put("TRANSACTOR_CERTI_CODE",KiteMapUtils.getString(map, "TRANSACTOR_CERTI_CODE"));
        QUERY_REAL_NAME_REQ.put("RESPONSIBLE_CERTI_CODE",KiteMapUtils.getString(map, "RESPONSIBLE_CERTI_CODE"));
        QUERY_REAL_NAME_REQ.put("OPER_USER_INFO", OPER_USER_INFO);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("QUERY_REAL_NAME_REQ", QUERY_REAL_NAME_REQ);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_customerCenter_queryRealNameList");

        InfServiceHelper.adaptGray(request, uniBssBody);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        Map<String, Object> QUERY_REAL_NAME_RSP = (Map<String, Object>) resultBodyMap.get("QUERY_REAL_NAME_RSP");
        if ("0".equals(KiteMapUtils.getString(QUERY_REAL_NAME_RSP, "RESULT_CODE"))) {
            return QUERY_REAL_NAME_RSP;
        }else{
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询实名制接口失败", "");
        }
        return null;
    }
    @Override
    public  Map<String, Object> registrationInfoDetail(String usercode, String iotTagCode) {
        List<CustContractRsp> list =  new ArrayList<>();
        Map<String, Object> QUERY_REAL_NAME_INFO_REQ = new HashMap<>();
        Map<String, Object> OPER_USER_INFO = new HashMap<>();
        OPER_USER_INFO.put("USER_CODE",usercode);
        QUERY_REAL_NAME_INFO_REQ.put("IOT_TAG_CODE",iotTagCode);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("QUERY_REAL_NAME_INFO_REQ", QUERY_REAL_NAME_INFO_REQ);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_customerCenter_queryRealNameInfo");

        InfServiceHelper.adaptGray(request, uniBssBody);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        Map<String, Object> QUERY_REAL_NAME_RSP = (Map<String, Object>) resultBodyMap.get("QUERY_REAL_NAME_INFO_RSP");
        if ("0".equals(KiteMapUtils.getString(QUERY_REAL_NAME_RSP, "RESULT_CODE"))) {
            return QUERY_REAL_NAME_RSP;
        }else{
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询实名制标签查询详情接口失败", "");
        }
        return null;
    }
    @Override
    public   Map<String, Object> listContractInfos(String custId, String contractNo, String contractName,
                                                   String dataCode, String provinceCode, int pageNum, int pageSize,String contractId) {
        List<CustContractRsp> list =  new ArrayList<>();
        Map<String, Object> qryCustContractInfo_REQ_BODY = new HashMap<>();
        Map<String, Object> qryCustContractInfo_REQ = new HashMap<>();
/*
        qryCustContractInfo_REQ_BODY.put("STAFF_CODE", ContextUtil.getLoginInfo().getStaffInfo().getStaffCode());
*/
        qryCustContractInfo_REQ_BODY.put("CONTRACT_NO", contractNo);
        qryCustContractInfo_REQ_BODY.put("CONTRACT_ID", contractId);
        qryCustContractInfo_REQ_BODY.put("CUST_ID", custId);

        qryCustContractInfo_REQ_BODY.put("CONTRACT_NAME", contractName);
        qryCustContractInfo_REQ_BODY.put("PROVINCE_CODE", provinceCode);
        qryCustContractInfo_REQ_BODY.put("CONTRACT_TYPE", dataCode);
        qryCustContractInfo_REQ_BODY.put("PAGE", String.valueOf(pageNum));
        qryCustContractInfo_REQ_BODY.put("SIZE", String.valueOf(pageSize));
        qryCustContractInfo_REQ.put("qryCustContractInfo_REQ_BODY",qryCustContractInfo_REQ_BODY);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("qryCustContractInfo_REQ", qryCustContractInfo_REQ);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_marketingCenter_qryContractForOrder");
        InfServiceHelper.adaptGray( request, qryCustContractInfo_REQ_BODY);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        Map<String, Object> qryCustContractInfo_RSP = (Map<String, Object>) resultBodyMap.get("qryCustContractInfo_RSP");
        if ("0000".equals(KiteMapUtils.getString(qryCustContractInfo_RSP, "RSP_CODE"))) {
            Map<String, Object> RSP_DETAIL = (Map<String, Object>) qryCustContractInfo_RSP.get("RSP_DETAIL");
            /*  list =this.dealContractResp((List<Map<String, Object>>) RSP_DETAIL.get("list"));*/
            return RSP_DETAIL;
        }else{
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合同接口失败", "");
        }
      /*  IOrderQueryService orderQueryService = SpringUtil.getBean(IOrderQueryService.class);
        InfService infService = orderQueryService
            .queryServiceBySvcCode(LocalCallClientEnum.QRY_CONTRACT_INFO.getServiceCode(),
                LocalCallClientEnum.QRY_CONTRACT_INFO.getCenterCode());

        String reqString = WebServiceHelper
            .replaceContractReq(provinceCode, contractNo, custId, null, contractName, dataCode, null);

        try {
            // "http://10.124.150.230:8000/services/QryContractForOrderSer/v1?wsdl"
            list = WebServiceHelper.dealContractResp(WebServiceUtil
                .invoke(reqString, SpringUtil.getBean(ICuccQueryInfService.class).getUrlByType(infService)));
        }
        catch (Exception e) {
            e.printStackTrace();
        }*/
        return null;

    }
    public static List<CustContractRsp> dealContractResp(List<Map<String, Object>> lists){
        List<CustContractRsp> list = new ArrayList<>();
        for (Map<String, Object> map : lists) {
            CustContractRsp custContractRsp = new CustContractRsp();
            custContractRsp.setContractNo(KiteMapUtils.getString(map, "CONTRACT_NO"));
            custContractRsp.setContractId(KiteMapUtils.getString(map, "CONTRACT_ID"));
            custContractRsp.setContractType(KiteMapUtils.getString(map, "CONTRACT_TYPE"));
            custContractRsp.setDataCode(KiteMapUtils.getString(map, "CONTRACT_TYPE"));
            custContractRsp.setContractName(KiteMapUtils.getString(map, "CONTRACT_NAME"));
            custContractRsp.setContractSum(KiteMapUtils.getString(map, "CONTRACT_SUM"));
            custContractRsp.setContractCurrency(KiteMapUtils.getString(map, "CONTRACT_CURRENCY"));
            custContractRsp.setOperNo(KiteMapUtils.getString(map, "OPER_NO"));
            custContractRsp.setOperName(KiteMapUtils.getString(map, "OPER_NAME"));
            custContractRsp.setOperDate(KiteMapUtils.getString(map, "OPER_DATE"));

            custContractRsp.setAccessoryId(KiteMapUtils.getString(map, "ACCESSORY_URL"));
            List<Map>  ATTACHMENTS = (List) map.get("ATTACHMENTS");
            List<KitePosAttachmentDTO> attachments = new ArrayList<KitePosAttachmentDTO>();
            ATTACHMENTS.stream().forEach (Map-> {
                KitePosAttachmentDTO attachements = new KitePosAttachmentDTO();
                attachements.setName(KiteMapUtils.getString(Map, "ACCESSORY_NAME"));
                attachements.setUrl(KiteMapUtils.getString(Map, "PREVIEW_ADDRESS"));
                attachements.setAccessoryId(KiteMapUtils.getString(Map, "ACCESSORY_ID"));
                attachements.setCatagory("13");
                attachments.add(attachements);
                custContractRsp.setAttachments(attachments);
            });
            list.add(custContractRsp);
        }

        return list;
    }
    @Override
    public Map<String, Object> endWorkSheetTask(String workSheetId, String taskCode, String taskId, String dealResult,
        String staffId, Object updateData, Object otherData) {
        // 订单审核不需要传updateData，有回执时回执信息放flowData.flowValue，otherData.failReason传审核不通过原因
        Map<String, Object> endWorkSheetTaskReq = new HashMap<>();
        endWorkSheetTaskReq.put("worksheetId", workSheetId); //必填
        endWorkSheetTaskReq.put("taskCode", taskCode);
        endWorkSheetTaskReq.put("dealResult", dealResult); //必填
        endWorkSheetTaskReq.put("staffId", staffId); //必填
        endWorkSheetTaskReq.put("otherData", otherData);
        if (Objects.nonNull(updateData)) {
            Map<String,Object> businessData=acceptStaffReplenish(JSONObject.toJavaObject(JSONObject.parseObject(JSON.toJSONString(updateData)), Map.class));
            endWorkSheetTaskReq.put("updateData", businessData);

        }

        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "json_jike_orderCenter_endWorkSheetTask");
        InfServiceHelper.adaptGray(request, endWorkSheetTaskReq);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("END_WORK_SHEET_TASK_REQ",
            JsonUtils.transKeyToUpperCaseObject(JSONObject.toJSONString(endWorkSheetTaskReq)));
        request.put("UNI_BSS_BODY", uniBssBody);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }

        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "结束工单任务失败", "");
        }
        return JsonUtils.parseObject(result, Map.class);
    }

    @Override
    public Map<String, Object> endWorkSheetTaskBatch(String workSheetId, String taskCode, String taskId, String dealResult,
                                                     String staffId, Object updateData, Object otherData) {
        // 订单审核不需要传updateData，有回执时回执信息放flowData.flowValue，otherData.failReason传审核不通过原因
        Map<String, Object> endWorkSheetTaskReq = new HashMap<>();
        endWorkSheetTaskReq.put("worksheetId", workSheetId); //必填
        endWorkSheetTaskReq.put("taskCode", taskCode);
        endWorkSheetTaskReq.put("dealResult", dealResult); //必填
        endWorkSheetTaskReq.put("staffId", staffId); //必填
        endWorkSheetTaskReq.put("otherData", otherData);
        if (Objects.nonNull(updateData)) {
            Map<String,Object> businessData=acceptStaffReplenish(JSONObject.toJavaObject(JSONObject.parseObject(JSON.toJSONString(updateData)), Map.class));
            endWorkSheetTaskReq.put("updateData", businessData);

        }

        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_orderCenter_endWorkSheetTaskBatch");
        InfServiceHelper.adaptGray(request, endWorkSheetTaskReq);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("END_WORK_SHEET_TASK_REQ",
            JsonUtils.transKeyToUpperCaseObject(JSONObject.toJSONString(endWorkSheetTaskReq)));
        request.put("UNI_BSS_BODY", uniBssBody);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }

        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "结束工单任务失败", "");
        }
        return JsonUtils.parseObject(result, Map.class);
    }

    @Override
    public List<SaleManageDTO> querySaleManager(String staffId, String channelId, String name, String origDomain,
                                                String productType) {
        Map inParams = new HashMap();
        inParams.put("staffId", staffId);
        inParams.put("channelId", channelId);
        inParams.put("name", name);
        inParams.put("staffId", staffId);
        inParams.put("origDomain", origDomain);
        inParams.put("productType", productType);

        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("SALESMANAGERQRY_REQ", inParams);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_sh31_convergentPlatforms_salesmanagerqry");
        InfServiceHelper.adaptGray(request, inParams);
        String result;
        List<SaleManageDTO> retList = new ArrayList<>();

        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_SALE_MANAGER.getServiceCode(), "查询销售经理失败", "");
        }
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        Map<String, Object> body = (Map) resultMap.get("UNI_BSS_BODY");
        Map<String, Object> rspSaleManageInfo = (Map) body.get("SALESMANAGERQRY_RSP");

        if ("0000".equals(KiteMapUtils.getString(rspSaleManageInfo, "respCode"))) {
            List<Map> saleManagerList = (List<Map>) rspSaleManageInfo.get("saleManagerList");
            saleManagerList.stream()
                .forEach(mge -> retList.add((SaleManageDTO) KiteMapUtils.mapToBean(mge, SaleManageDTO.class)));
        }
        return retList;
    }

    @Override
    public List<ExecAddressDTO> queryAddress(Map addrMap) {
        Map inParams = new HashMap();
        Map rouTingParams = new HashMap();
        rouTingParams = (Map) addrMap.get("ROUTING");
        //        inParams = (Map) JSON.parseObject(KiteMapUtils.getString(addrMap, "map"), Map.class);
        //        addrMap = inParams;

        inParams.put("CITY_CODE", KiteMapUtils.getStrValue(addrMap, "CITY_CODE"));
        inParams.put("CHANNEL_ID", KiteMapUtils.getStrValue(addrMap, "CHANNEL_ID"));
        inParams.put("PAGE_NUM", KiteMapUtils.getStrValue(addrMap, "PAGE_NUM"));
        inParams.put("PAGE_SIZE", KiteMapUtils.getStrValue(addrMap, "PAGE_SIZE"));
        inParams.put("CHANNEL_TYPE", KiteMapUtils.getStrValue(addrMap, "CHANNEL_TYPE"));
        inParams.put("EPARCHY_CODE", KiteMapUtils.getStrValue(addrMap, "EPARCHY_CODE"));
        inParams.put("PROVINCE_CODE", KiteMapUtils.getStrValue(addrMap, "PROVINCE_CODE"));
        inParams.put("OPER_ID", KiteMapUtils.getStrValue(addrMap, "OPER_ID"));
        inParams.put("INSTALL_ADDRESS", KiteMapUtils.getStrValue(addrMap, "INSTALL_ADDRESS"));
        inParams.put("QRY_TYPE", KiteMapUtils.getStrValue(addrMap, "QRY_TYPE"));
        inParams.put("ROUTING", rouTingParams);

        Map result = HttpsCallClient.post(LocalCallClientEnum.QRY_ADDRESS_INFO, inParams);
        if (result == null) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_ADDRESS_INFO.getServiceCode(), "查询装机地址失败", "");
        }

        Map<String, Object> messageMap = JSON.parseObject(result.get("message").toString(), Map.class);
        Map<String, Object> body = (Map) messageMap.get("UNI_BSS_BODY");
        Map<String, Object> installAddressInfo = (Map) body.get("QRY_ADDRESS_API_RSP");

        List<ExecAddressDTO> retList = new ArrayList<>();
        if ("0000".equalsIgnoreCase(KiteMapUtils.getString(installAddressInfo, "RESP_CODE"))) {
            List<Map<String, Object>> addressList = JSON
                .parseObject(installAddressInfo.get("ADDRESS_LIST").toString(), List.class);
            addressList.stream().forEach(
                address -> retList.add((ExecAddressDTO) JSON.toJavaObject((JSON) address, ExecAddressDTO.class)));
        }
        else {
            retList.add((ExecAddressDTO) JSON.toJavaObject((JSON) installAddressInfo, ExecAddressDTO.class));
        }
        return retList;
    }

    @Override
    public Map<String, Object> customerListQuery(Map custInfo) {
        Map result = HttpsCallClient.post(LocalCallClientEnum.QRY_CUSTOMER_LIST, custInfo);
        if (result == null) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_CUSTOMER_LIST.getServiceCode(), "查询客户信息失败", "");
        }
        return result;
    }

    @Override
    public Map<String, Object> getCustomerDetail(Map custInfo) {
        Map result = HttpsCallClient.post(LocalCallClientEnum.QRY_CUSTOMER_DETAIL, custInfo);
        if (result == null) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_CUSTOMER_DETAIL.getServiceCode(), "查询客户详情失败", "");
        }
        return result;
    }

    @Override
    public Map<String, Object> getOneSchedule(Map info) {
        Map result = HttpsCallClient.post(LocalCallClientEnum.QRY_ONE_SCHEDULE, info);
        if (result == null) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_ONE_SCHEDULE.getServiceCode(), "查询一站进度失败", "");
        }
        return result;
    }

    @Override
    public Map<String, Object> queryOssProGress(Map ossInfo) {
        Map result = HttpsCallClient.post(LocalCallClientEnum.QRY_OSS_PROGRESS, ossInfo);
        if (result == null) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_OSS_PROGRESS.getServiceCode(), "OSS进度查询失败", "");
        }
        return result;
    }

    @Override
    public List<ResPreJudgeDTO> queryResPrejudge(Map resInfo) {
        //resInfo = (Map)JSON.parseObject(KiteMapUtils.getString(resInfo,"resInfo"),Map.class);
        List<ResPreJudgeDTO> retList = new ArrayList<>();
        Map result = HttpsCallClient.post(LocalCallClientEnum.QRY_RES_PREJUDGE, resInfo);
        Map resultMessage = (Map) JSON.parseObject(KiteMapUtils.getString(result, "message"), Map.class);
        Map resultBody = (Map) JSON.parseObject(KiteMapUtils.getString(resultMessage, "UNI_BSS_BODY"), Map.class);
        Map resultRsp = (Map) JSON.parseObject(KiteMapUtils.getString(resultBody, "RES_PREJUDGE_API_RSP"), Map.class);
        List<Map> resultAccessList = (List<Map>) JSON
            .parseObject(KiteMapUtils.getString(resultRsp, "ACCESS_LIST"), List.class);

        if (!"0000".equals(KiteMapUtils.getString(resultRsp, "RESP_CODE"))) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.QRY_RES_PREJUDGE.getServiceCode(), "资源查询失败", "");
        }
        resultAccessList.stream().forEach(resultAccess -> {
            retList.add((ResPreJudgeDTO) JSON.toJavaObject((JSON) resultAccess, ResPreJudgeDTO.class));
        });
        return retList;
    }

    @Override
    public Map<String, Object> getProcessFlowChart(Map flowChartMap) {
        flowChartMap.put("taskId", KiteMapUtils.getStrValue(flowChartMap, "taskId"));
        flowChartMap.put("worksheetType", KiteMapUtils.getStrValue(flowChartMap, "worksheetType"));
        Map result = HttpsCallClient.get(LocalCallClientEnum.QRY_PROCESS_FLOWCHART, flowChartMap);
        if (result == null) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_PROCESS_FLOWCHART.getServiceCode(), "获取流程图数据失败！", "");
        }
        return result;
    }

    @Override
    public Map<String, Object> specialProcess(String opType, String orderId, Map<String, Object> flowProcessDataMap,
        Map<String, Object> businessData) {
        acceptStaffReplenish(businessData);
        Map<String, Object> specialProcessReq = new HashMap<>();
        specialProcessReq.put("orderId", orderId);
        specialProcessReq.put("opType", opType);
        //        businessData.put("status", "4"); // 关闭状态

        if (KiteMapUtils.isNotEmpty(flowProcessDataMap)) {
            specialProcessReq.put("flowProcessData", flowProcessDataMap);
        }
        if (KiteMapUtils.isNotEmpty(businessData)) {
            specialProcessReq.put("businessData", businessData);
        }
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("SPECIAL_PROCESS_REQ", specialProcessReq);

        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_jike_orderCenter_specialProcess");
        InfServiceHelper.adaptGray(request, specialProcessReq);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (result == null) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut("json_jike_orderCenter_specialProcess", "特殊接口处理失败！", "");
        }
        return JSON.parseObject(result, Map.class);
    }

    @Override
    public Map<String, Object> qryLoginInfo(String authSessionId) {
        Map<String, String> reqMap = new HashMap<>();
        reqMap.put("authSessionId", authSessionId);
        reqMap.put("appId", LocalInfConsts.LOGIN_APP_ID);
        String resultStr = "";
        if (GeneralSwitchUtils.isSwitchOpened("IS_PRETEND_LOGIN_RESULT")) {
            try {
                //                resultStr = FileUtils
                //                    .readFileToString(new File(this.getClass().getResource("/jsonString/baiss3.json").getPath()));
                resultStr = "{\n" + "  \"resultCode\": \"0\",\n" + "  \"resultObject\": {\n" + "    \"userInfo\": {\n"
                    + "      \"oaUserId\": 318278,\n" + "      \"number\": \"10038062\",\n"
                    + "      \"hrNumber\": \"0770782\",\n" + "      \"name\": \"白莎莎\",\n"
                    + "      \"login\": \"baiss3\",\n" + "      \"accountId\": \"1005222271\",\n"
                    + "      \"account\": \"baiss3\",\n" + "      \"cbssAccount\": \"baiss3-cs\",\n"
                    + "      \"accountType\": \"1\",\n" + "      \"accountContainType\": \"1|7|6\",\n"
                    + "      \"phone\": \"17600163727\",\n" + "      \"email\": \"baiss3@chinaunicom.cn\",\n"
                    + "      \"deptId\": \"1104720\",\n" + "      \"deptName\": \"北京市五区分公司.市场营销部.国贸营业厅\",\n"
                    + "      \"orgId\": \"12\",\n" + "      \"orgName\": \"北京市分公司\",\n" + "      \"org2Id\": \"281\",\n"
                    + "      \"org2Name\": \"北京市五区分公司\",\n" + "      \"org3Id\": \"281\",\n"
                    + "      \"org3Name\": \"北京市五区分公司\",\n" + "      \"orgLevel\": 20,\n"
                    + "      \"userProvince\": \"11\",\n" + "      \"provinceName\": \"北京\",\n"
                    + "      \"userCity\": \"110\",\n" + "      \"userCounty\": \"110\",\n"
                    + "      \"loginWay\": \"1\",\n" + "      \"oftenGovAccount\": \"baiss3\",\n"
                    + "      \"oftenCbssAccount\": \"baiss3-cs\"\n" + "    },\n" + "    \"orgInfo\": {\n"
                    + "      \"orgId\": \"9015683\",\n" + "      \"orgName\": \"北京市五区分公司.市场营销部.国贸营业厅\",\n"
                    + "      \"orgCode\": \"9015683100\",\n" + "      \"parentOrgId\": 1647929,\n"
                    + "      \"orgLevel\": 20,\n" + "      \"provinceCode\": \"11\",\n"
                    + "      \"eparchyCode\": \"110\",\n" + "      \"cityCode\": \"110\",\n"
                    + "      \"departId\": \"1104720\"\n" + "    },\n" + "    \"userRoles\": [\n" + "      {\n"
                    + "        \"sysRoleId\": 172,\n" + "        \"sysRoleName\": \"销售中心临时角色\",\n"
                    + "        \"sysRoleCode\": \"KH40003\",\n" + "        \"sysRoleType\": \"1006\"\n" + "      },\n"
                    + "      {\n" + "        \"sysRoleId\": 175,\n" + "        \"sysRoleName\": \"系统管理员\",\n"
                    + "        \"sysRoleCode\": \"KH10001\",\n" + "        \"sysRoleType\": \"1000\"\n" + "      },\n"
                    + "      {\n" + "        \"sysRoleId\": 1400,\n" + "        \"sysRoleName\": \"(统一门户)(北京)客户经理\",\n"
                    + "        \"sysRoleCode\": \"5034\",\n" + "        \"sysUniqueCode\": \"TYMH_ZQ_11005034\",\n"
                    + "        \"sysRoleType\": \"TYMH_4502\",\n" + "        \"sysCode\": \"10096\"\n" + "      },\n"
                    + "      {\n" + "        \"sysRoleId\": 1399,\n"
                    + "        \"sysRoleName\": \"(统一门户)(北京)商机客户经理\",\n" + "        \"sysRoleCode\": \"5033\",\n"
                    + "        \"sysUniqueCode\": \"TYMH_ZQ_11005033\",\n" + "        \"sysRoleType\": \"TYMH_4502\",\n"
                    + "        \"sysCode\": \"10096\"\n" + "      },\n" + "      {\n" + "        \"sysRoleId\": 1920,\n"
                    + "        \"sysRoleName\": \"(统一门户)(北京)业务受理人员\",\n" + "        \"sysRoleCode\": \"8000001060\",\n"
                    + "        \"sysUniqueCode\": \"TYMH_ZQ_8000001060\",\n"
                    + "        \"sysRoleType\": \"TYMH_4501\",\n" + "        \"sysCode\": \"10096\"\n" + "      },\n"
                    + "      {\n" + "        \"privId\": 5526,\n"
                    + "        \"privCode\": \"f9b030227cf0453b89db9430247093db\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8078\",\n" + "        \"privName\": \"(订单中心)核查转定\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5526,\n"
                    + "        \"privCode\": \"f9b030227cf0453b89db9430247093db\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8078\",\n" + "        \"privName\": \"(订单中心)核查转定\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5562,\n" + "        \"privCode\": \"SP0442\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0442\",\n" + "        \"privName\": \"(订单中心)销售商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5562,\n" + "        \"privCode\": \"SP0442\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0442\",\n" + "        \"privName\": \"(订单中心)销售商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5508,\n" + "        \"privCode\": \"DD8090\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8090\",\n"
                    + "        \"privName\": \"(订单中心)预约传送计划变更\"\n" + "      },\n" + "      {\n"
                    + "        \"privId\": 5508,\n" + "        \"privCode\": \"DD8090\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8090\",\n"
                    + "        \"privName\": \"(订单中心)预约传送计划变更\"\n" + "      },\n" + "      {\n"
                    + "        \"privId\": 5464,\n" + "        \"privCode\": \"DD0025\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0025\",\n" + "        \"privName\": \"(订单中心)用户预销户\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5464,\n" + "        \"privCode\": \"DD0025\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0025\",\n" + "        \"privName\": \"(订单中心)用户预销户\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5532,\n" + "        \"privCode\": \"JC0054\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0054\",\n" + "        \"privName\": \"(订单中心)菜单管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5458,\n" + "        \"privCode\": \"DD0012\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0012\",\n" + "        \"privName\": \"(订单中心)订单待办\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5506,\n" + "        \"privCode\": \"DD8088\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8088\",\n" + "        \"privName\": \"(订单中心)特殊停机\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5506,\n" + "        \"privCode\": \"DD8088\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8088\",\n" + "        \"privName\": \"(订单中心)特殊停机\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5494,\n" + "        \"privCode\": \"DD0332\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0332\",\n" + "        \"privName\": \"(订单中心)延期\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5555,\n" + "        \"privCode\": \"SP0045\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0045\",\n" + "        \"privName\": \"(订单中心)价格管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5555,\n" + "        \"privCode\": \"SP0045\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0045\",\n" + "        \"privName\": \"(订单中心)价格管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5490,\n" + "        \"privCode\": \"DD0326\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0326\",\n" + "        \"privName\": \"(订单中心)我的订单\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5488,\n" + "        \"privCode\": \"DD0324\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0324\",\n"
                    + "        \"privName\": \"(订单中心)客户订单进度查询\"\n" + "      },\n" + "      {\n"
                    + "        \"privId\": 5486,\n" + "        \"privCode\": \"DD0322\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0322\",\n" + "        \"privName\": \"(订单中心)客户订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5484,\n" + "        \"privCode\": \"DD0317\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0317\",\n" + "        \"privName\": \"(订单中心)集团用户移机\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5502,\n" + "        \"privCode\": \"DD0354\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0354\",\n" + "        \"privName\": \"(订单中心)带宽预约调整\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5470,\n" + "        \"privCode\": \"DD0035\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0035\",\n" + "        \"privName\": \"(订单中心)客户网管\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5466,\n" + "        \"privCode\": \"DD0031\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0031\",\n" + "        \"privName\": \"(订单中心)业务订购\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5539,\n" + "        \"privCode\": \"JC0061\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0061\",\n" + "        \"privName\": \"(订单中心)区域与组织机构\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5551,\n" + "        \"privCode\": \"SP0041\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0041\",\n" + "        \"privName\": \"(订单中心)属性管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5551,\n" + "        \"privCode\": \"SP0041\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0041\",\n" + "        \"privName\": \"(订单中心)属性管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5468,\n" + "        \"privCode\": \"DD0033\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0033\",\n" + "        \"privName\": \"(订单中心)特殊处理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5529,\n" + "        \"privCode\": \"JC0051\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0051\",\n" + "        \"privName\": \"(订单中心)用户管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5552,\n" + "        \"privCode\": \"SP0042\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0042\",\n" + "        \"privName\": \"(订单中心)分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5485,\n" + "        \"privCode\": \"DD0321\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0321\",\n" + "        \"privName\": \"(订单中心)待办工作台\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5556,\n" + "        \"privCode\": \"SP0411\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0411\",\n" + "        \"privName\": \"(订单中心)属性值管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5556,\n" + "        \"privCode\": \"SP0411\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0411\",\n" + "        \"privName\": \"(订单中心)属性值管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5549,\n" + "        \"privCode\": \"ONE001\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_ONE001\",\n" + "        \"privName\": \"(订单中心)一站式\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5541,\n" + "        \"privCode\": \"JC0521\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0521\",\n"
                    + "        \"privName\": \"(订单中心)用户工号映射管理\"\n" + "      },\n" + "      {\n"
                    + "        \"privId\": 5467,\n" + "        \"privCode\": \"DD0032\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0032\",\n" + "        \"privName\": \"(订单中心)日常工作\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5542,\n" + "        \"privCode\": \"JC0522\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0522\",\n"
                    + "        \"privName\": \"(订单中心)业务映射工号管理\"\n" + "      },\n" + "      {\n"
                    + "        \"privId\": 5481,\n" + "        \"privCode\": \"DD0314\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0314\",\n" + "        \"privName\": \"(订单中心)核查单转订\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5455,\n" + "        \"privCode\": \"DD0003\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0003\",\n" + "        \"privName\": \"(订单中心)精品网专区\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5496,\n" + "        \"privCode\": \"DD0334\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0334\",\n" + "        \"privName\": \"(订单中心)电路解挂\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5501,\n" + "        \"privCode\": \"DD0353\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0353\",\n" + "        \"privName\": \"(订单中心)性能数据展示\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5544,\n" + "        \"privCode\": \"JC0612\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0612\",\n" + "        \"privName\": \"(订单中心)组织机构信息\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5528,\n" + "        \"privCode\": \"JC0005\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0005\",\n" + "        \"privName\": \"(订单中心)基础管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5463,\n" + "        \"privCode\": \"DD0024\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0024\",\n" + "        \"privName\": \"(订单中心)用户复机\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5463,\n" + "        \"privCode\": \"DD0024\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0024\",\n" + "        \"privName\": \"(订单中心)用户复机\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5511,\n" + "        \"privCode\": \"DD8094\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8094\",\n" + "        \"privName\": \"(订单中心)商机转定\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5511,\n" + "        \"privCode\": \"DD8094\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD8094\",\n" + "        \"privName\": \"(订单中心)商机转定\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5465,\n" + "        \"privCode\": \"DD0026\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0026\",\n" + "        \"privName\": \"(订单中心)用户销户\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5465,\n" + "        \"privCode\": \"DD0026\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0026\",\n" + "        \"privName\": \"(订单中心)用户销户\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5487,\n" + "        \"privCode\": \"DD0323\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0323\",\n" + "        \"privName\": \"(订单中心)业务订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5533,\n" + "        \"privCode\": \"JC0055\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0055\",\n" + "        \"privName\": \"(订单中心)模板管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5457,\n" + "        \"privCode\": \"DD0011\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0011\",\n" + "        \"privName\": \"(订单中心)订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5457,\n" + "        \"privCode\": \"DD0011\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0011\",\n" + "        \"privName\": \"(订单中心)订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5489,\n" + "        \"privCode\": \"DD0325\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0325\",\n"
                    + "        \"privName\": \"(订单中心)业务订单进度查询\"\n" + "      },\n" + "      {\n"
                    + "        \"privId\": 5560,\n" + "        \"privCode\": \"SP0422\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0422\",\n" + "        \"privName\": \"(订单中心)商品分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5560,\n" + "        \"privCode\": \"SP0422\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0422\",\n" + "        \"privName\": \"(订单中心)商品分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5462,\n" + "        \"privCode\": \"DD0023\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0023\",\n" + "        \"privName\": \"(订单中心)用户停机\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5462,\n" + "        \"privCode\": \"DD0023\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0023\",\n" + "        \"privName\": \"(订单中心)用户停机\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5443,\n"
                    + "        \"privCode\": \"96b044378dac4e01a48d768e127b5dd6\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_XT6947\",\n" + "        \"privName\": \"(订单中心)处理人配置\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5493,\n" + "        \"privCode\": \"DD0331\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0331\",\n" + "        \"privName\": \"(订单中心)加急\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5491,\n" + "        \"privCode\": \"DD0327\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0327\",\n" + "        \"privName\": \"(订单中心)订单补全\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5536,\n" + "        \"privCode\": \"JC0058\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0058\",\n" + "        \"privName\": \"(订单中心)异常管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5555,\n" + "        \"privCode\": \"SP0045\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0045\",\n" + "        \"privName\": \"(订单中心)价格管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5555,\n" + "        \"privCode\": \"SP0045\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0045\",\n" + "        \"privName\": \"(订单中心)价格管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5556,\n" + "        \"privCode\": \"SP0411\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0411\",\n" + "        \"privName\": \"(订单中心)属性值管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5556,\n" + "        \"privCode\": \"SP0411\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0411\",\n" + "        \"privName\": \"(订单中心)属性值管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5550,\n" + "        \"privCode\": \"SP0004\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0004\",\n" + "        \"privName\": \"(订单中心)商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5528,\n" + "        \"privCode\": \"JC0005\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0005\",\n" + "        \"privName\": \"(订单中心)基础管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5534,\n" + "        \"privCode\": \"JC0056\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0056\",\n" + "        \"privName\": \"(订单中心)个人设置\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5490,\n" + "        \"privCode\": \"DD0326\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0326\",\n" + "        \"privName\": \"(订单中心)我的订单\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5501,\n" + "        \"privCode\": \"DD0353\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0353\",\n" + "        \"privName\": \"(订单中心)性能数据展示\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5554,\n" + "        \"privCode\": \"SP0044\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0044\",\n" + "        \"privName\": \"(订单中心)商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5554,\n" + "        \"privCode\": \"SP0044\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0044\",\n" + "        \"privName\": \"(订单中心)商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5487,\n" + "        \"privCode\": \"DD0323\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0323\",\n" + "        \"privName\": \"(订单中心)业务订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5467,\n" + "        \"privCode\": \"DD0032\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0032\",\n" + "        \"privName\": \"(订单中心)日常工作\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5558,\n" + "        \"privCode\": \"SP0413\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0413\",\n" + "        \"privName\": \"(订单中心)属性组管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5558,\n" + "        \"privCode\": \"SP0413\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0413\",\n" + "        \"privName\": \"(订单中心)属性组管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5457,\n" + "        \"privCode\": \"DD0011\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0011\",\n" + "        \"privName\": \"(订单中心)订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5457,\n" + "        \"privCode\": \"DD0011\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0011\",\n" + "        \"privName\": \"(订单中心)订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5553,\n" + "        \"privCode\": \"SP0043\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0043\",\n" + "        \"privName\": \"(订单中心)产品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5553,\n" + "        \"privCode\": \"SP0043\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0043\",\n" + "        \"privName\": \"(订单中心)产品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5500,\n" + "        \"privCode\": \"DD0352\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0352\",\n" + "        \"privName\": \"(订单中心)资源数据视图\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5453,\n" + "        \"privCode\": \"DD0001\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0001\",\n" + "        \"privName\": \"(订单中心)订单管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5529,\n" + "        \"privCode\": \"JC0051\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0051\",\n" + "        \"privName\": \"(订单中心)用户管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5531,\n" + "        \"privCode\": \"JC0053\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0053\",\n" + "        \"privName\": \"(订单中心)角色管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5417,\n"
                    + "        \"privCode\": \"0fc07a4ad4de4f75b7c08428feec07de\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP5617\",\n" + "        \"privName\": \"(订单中心)活动管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5417,\n"
                    + "        \"privCode\": \"0fc07a4ad4de4f75b7c08428feec07de\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP5617\",\n" + "        \"privName\": \"(订单中心)活动管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5470,\n" + "        \"privCode\": \"DD0035\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0035\",\n" + "        \"privName\": \"(订单中心)客户网管\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5557,\n" + "        \"privCode\": \"SP0412\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0412\",\n" + "        \"privName\": \"(订单中心)单属性管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5552,\n" + "        \"privCode\": \"SP0042\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0042\",\n" + "        \"privName\": \"(订单中心)分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5535,\n" + "        \"privCode\": \"JC0057\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_JC0057\",\n" + "        \"privName\": \"(订单中心)通知与公告管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5559,\n" + "        \"privCode\": \"SP0421\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0421\",\n" + "        \"privName\": \"(订单中心)产品分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5559,\n" + "        \"privCode\": \"SP0421\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0421\",\n" + "        \"privName\": \"(订单中心)产品分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5486,\n" + "        \"privCode\": \"DD0322\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0322\",\n" + "        \"privName\": \"(订单中心)客户订单查询\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5458,\n" + "        \"privCode\": \"DD0012\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0012\",\n" + "        \"privName\": \"(订单中心)订单待办\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5488,\n" + "        \"privCode\": \"DD0324\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0324\",\n"
                    + "        \"privName\": \"(订单中心)客户订单进度查询\"\n" + "      },\n" + "      {\n"
                    + "        \"privId\": 5485,\n" + "        \"privCode\": \"DD0321\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0321\",\n" + "        \"privName\": \"(订单中心)待办工作台\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5551,\n" + "        \"privCode\": \"SP0041\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0041\",\n" + "        \"privName\": \"(订单中心)属性管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5551,\n" + "        \"privCode\": \"SP0041\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0041\",\n" + "        \"privName\": \"(订单中心)属性管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5560,\n" + "        \"privCode\": \"SP0422\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0422\",\n" + "        \"privName\": \"(订单中心)商品分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5560,\n" + "        \"privCode\": \"SP0422\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0422\",\n" + "        \"privName\": \"(订单中心)商品分类管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5455,\n" + "        \"privCode\": \"DD0003\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0003\",\n" + "        \"privName\": \"(订单中心)精品网专区\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5561,\n" + "        \"privCode\": \"SP0441\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0441\",\n" + "        \"privName\": \"(订单中心)基础商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5499,\n" + "        \"privCode\": \"DD0351\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0351\",\n" + "        \"privName\": \"(订单中心)网络监控拓扑\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5562,\n" + "        \"privCode\": \"SP0442\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0442\",\n" + "        \"privName\": \"(订单中心)销售商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5562,\n" + "        \"privCode\": \"SP0442\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_SP0442\",\n" + "        \"privName\": \"(订单中心)销售商品管理\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5502,\n" + "        \"privCode\": \"DD0354\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0354\",\n" + "        \"privName\": \"(订单中心)带宽预约调整\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5549,\n" + "        \"privCode\": \"ONE001\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_ONE001\",\n" + "        \"privName\": \"(订单中心)一站式\"\n"
                    + "      },\n" + "      {\n" + "        \"privId\": 5489,\n" + "        \"privCode\": \"DD0325\",\n"
                    + "        \"uniqueCode\": \"DDZX_ZQ_MENU_DD0325\",\n"
                    + "        \"privName\": \"(订单中心)业务订单进度查询\"\n" + "      }\n" + "    ],\n"
                    + "    \"oaUserInfo\": {\n" + "      \"oaUserId\": 318278,\n" + "      \"number\": \"10038062\",\n"
                    + "      \"hrNumber\": \"0770782\",\n" + "      \"name\": \"白莎莎\",\n"
                    + "      \"login\": \"baiss3\",\n" + "      \"accountId\": \"1005222271\",\n"
                    + "      \"account\": \"baiss3\",\n" + "      \"cbssAccount\": \"baiss3-cs\",\n"
                    + "      \"accountType\": \"1\",\n" + "      \"accountContainType\": \"1|7|6\",\n"
                    + "      \"phone\": \"17600163727\",\n" + "      \"email\": \"baiss3@chinaunicom.cn\",\n"
                    + "      \"deptId\": \"1104720\",\n" + "      \"deptName\": \"北京市五区分公司.市场营销部.国贸营业厅\",\n"
                    + "      \"orgId\": \"12\",\n" + "      \"orgName\": \"北京市分公司\",\n" + "      \"org2Id\": \"281\",\n"
                    + "      \"org2Name\": \"北京市五区分公司\",\n" + "      \"org3Id\": \"281\",\n"
                    + "      \"org3Name\": \"北京市五区分公司\",\n" + "      \"orgLevel\": 20,\n"
                    + "      \"userProvince\": \"11\",\n" + "      \"provinceName\": \"北京\",\n"
                    + "      \"userCity\": \"110\",\n" + "      \"userCounty\": \"110\",\n"
                    + "      \"loginWay\": \"1\",\n" + "      \"oftenGovAccount\": \"baiss3\",\n"
                    + "      \"oftenCbssAccount\": \"baiss3-cs\"\n" + "    },\n" + "    \"checkAndBaseInfo\": {\n"
                    + "      \"oaUserId\": 318278,\n" + "      \"isSuperAdmin\": false,\n"
                    + "      \"isMenuInRedis\": false\n" + "    }\n" + "  }\n" + "}";
            }
            catch (Exception e) {
                e.printStackTrace();
            }
        }
        else {
            resultStr = HttpsCallClient.getString(LocalCallClientEnum.QUERY_LOGININFO, reqMap);
        }

        Map<String, Object> result = JSON.parseObject(resultStr);
        if (KiteMapUtils.isEmpty(result)) {
            BssException.throwOut("41301002", "S-SYS-00027", "登录已超时，请重新登录");
        }
        return result;
    }

    @Override
    public Map<String, Object> orderCenterFileUpload(String fileName, String fileType, String fileBody) {
        Map<String, Object> upLoadReq = new HashMap<>();
        upLoadReq.put("FILE_NAME", fileName);
        upLoadReq.put("REQUEST_ID", TransactionIdUtils.getTransactionIdOrRandom()); //必填
        upLoadReq.put("APP_ID", LocalInfConsts.APP_ID); //必填
        upLoadReq.put("SOURCE_MALL", "3"); //必填 来源触点
        upLoadReq.put("FILE_TYPE", fileType); //必填 附件文件类型
        upLoadReq.put("FILE_BODY", fileBody); //必填 base64
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("ORDER_CENTER_FILE_UPLOAD_REQ", upLoadReq);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBody);
        requestMap.put("OP_CODE", "json_jike_orderCenter_orderCenterFileUpload");
        InfServiceHelper.adaptGray(requestMap, upLoadReq);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObjectWithoutLog(LocalCallClientEnum.INF_COMMON_URL.getCenterCode(),
                    LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), requestMap,
                    LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.ORDER_CENTER_FILE_UPLOAD.getServiceCode(), "政企订单文件上传服务接口处理失败！", "");
        }
        Map<String, Object> resultMap = LocalTokenUtil
            .checkRespParamAndGetObject(result, "ORDER_CENTER_FILE_UPLOAD_RSP", Map.class);
        if (!KiteStringUtils
            .equals(KiteMapUtils.getString(resultMap, "STATUS"), LocalInfConsts.UNI_BSS_BODY_RESULT_SUCCESS)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_jike_orderCenter_orderCenterFileUpload",KiteMapUtils.getString(resultMap, "MESSAGE"));
        }
        return resultMap;
    }
    @Override
    public Map<String, Object> orderCenterFileDownload(String fileId) {
        Map<String, Object> downLoadReq = new HashMap<>();
        downLoadReq.put("fileId", fileId);
        downLoadReq.put("APP_ID", LocalInfConsts.APP_ID);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("DOWNLOAD_REQ", downLoadReq);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBody);
        requestMap.put("OP_CODE", "json_jike_orderCenter_download");
        InfServiceHelper.adaptGray(requestMap, downLoadReq);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.ORDER_CENTER__DOWNLOAD.getServiceCode(), "政企订单中心文件下载接口处理失败！", "");
        }
        Map<String, Object> resultMap = LocalTokenUtil.checkRespParamAndGetObject(result, "DOWNLOAD_RSP", Map.class);
        return resultMap;
    }

    @Override
    public Map<String, Object> acceptanceOrderDownload(String sourceOrderId, String orderId) {
        Map<String, String> downloalReq = new HashMap<>();
        downloalReq.put("APP_ID", "kite");
        downloalReq.put("SOURCE_MALL", "1");
        downloalReq.put("SOURCE_ORDER_ID", sourceOrderId);
        downloalReq.put("ORDER_ID", orderId);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("ORDER_CENTER_FILE_UPLOAD_REQ", downloalReq);
        Map<String, Object> map = LocalTokenUtil.getParamMap(uniBssBody);
        String result = HttpsCallClient
            .postStringWithObject(LocalCallClientEnum.ACCEPTANCE_ORDER_DOWNLOAD, uniBssBody, null);
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.ACCEPTANCE_ORDER_DOWNLOAD.getServiceCode(), "政企订单受理单下载服务接口处理失败！", "");
        }
        Map<String, Object> resultMap = LocalTokenUtil
            .checkRespParamAndGetObject(result, "ORDER_CENTER_FILE_UPLOAD_RSP", Map.class);
        return resultMap;
    }

    @Override
    public PageInfo<QueryChannelInfoSerRsp> qryChannelInfo(Map<String, Object> qryChannelInfoReq, Integer pageSize,
        Integer pageNum) {
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("QRY_CHANNEL_INFO_SER_REQ", qryChannelInfoReq);
        Map<String, Object> param = LocalTokenUtil.getParamMap(uniBssBody);
        param.put("OP_CODE", "json_GEcustomerCenter_IBSDMCapacityService_qryChannelInfoSer");
        InfServiceHelper.adaptGray(param, qryChannelInfoReq);
        String result;
        if (CallClientUtils.callByHttp()) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL.getCenterCode(),
                LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), param, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(param));
        }
//        String result = HttpsCallClient
//            .postStringWithObject(LocalCallClientEnum.QRY_CHANNEL_INFO_SER, LocalTokenUtil.getParamMap(uniBssBody),
//                LocalTokenUtil.getHeaderMap());
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "渠道信息查询服务处理失败！", "");
        }
        PageInfo<QueryChannelInfoSerRsp> channelInfo = LocalTokenUtil
            .checkRespParamAndGetDataListPage(result, "QRY_CHANNEL_INFO_SER_RSP", QueryChannelInfoSerRsp.class,
                pageSize, pageNum);
        return channelInfo;
    }

    @Override
    public PageInfo<QueryDeveloperInfoRespDTO> qryDeveloperInfoSer(Map<String, Object> qryDeveloperInfoReq,
        Integer pageSize, Integer pageNum) {
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("QRY_DEVELOPER_INFO_SER_REQ", qryDeveloperInfoReq);
        Map<String, Object> param = LocalTokenUtil.getParamMap(uniBssBody);
        param.put("OP_CODE", "QRY_DEVELOPER_INFO_SER");
        InfServiceHelper.adaptGray(param, qryDeveloperInfoReq);
        String result;
        if (CallClientUtils.callByHttp()) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL.getCenterCode(),
                LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), param, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(param));
        }
//        String result = HttpsCallClient
//            .postStringWithObject(LocalCallClientEnum.QRY_DEVELOPER_INFO_SER, LocalTokenUtil.getParamMap(uniBssBody),
//                LocalTokenUtil.getHeaderMap());
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "发展人查询服务处理失败！", "");
        }
        PageInfo<QueryDeveloperInfoRespDTO> developerInfoList = LocalTokenUtil
            .checkRespParamAndGetDataListPage(result, "QRY_DEVELOPER_INFO_SER_RSP", QueryDeveloperInfoRespDTO.class,
                pageSize, pageNum);
        return developerInfoList;
    }

    @Override
    public Map<String, Object> contractAcceptanceOrderDownload(String orderId, String sourceOrderId) {
        //        Map<String, String> downloalReq = new HashMap<>();
        //        downloalReq.put("APP_ID", "kite"); // 必填
        //        downloalReq.put("SOURCE_MALL", "1");
        //        downloalReq.put("SOURCE_ORDER_ID", sourceOrderId);
        //        downloalReq.put("ORDER_ID", orderId);
        //        Map<String, Object> uniBssBody = new HashMap<>();
        //        uniBssBody.put("ACCEPTANCE_ORDER_DOWNLOAD_REQ", downloalReq);
        //        String result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.CONTRACT_ACCEPTANCE_ORDER_DOWNLOAD, uniBssBody, null);
        //        if (KiteStringUtils.isEmpty(result)) {
        //            ErrorConsts.INF_INVOKE_ERROR
        //                .throwOut(LocalCallClientEnum.CONTRACT_ACCEPTANCE_ORDER_DOWNLOAD.getServiceCode(), "受理单下载服务接口处理失败！", "");
        //        }
        //        Map<String, Object> resultMap = LocalTokenUtil.checkRespParamAndGetObject(result, "ORDER_CENTER_FILE_UPLOAD_RSP", Map.class);
        //        return resultMap;
        return null;
    }

    @Override
    public Map<String, Object> uploadFile(String fileName, String fileExt, String fileContent) {
        Map<String, String> uploadFileReq = new HashMap<>();
        uploadFileReq.put("FILE_NAME", fileName); //必填
        uploadFileReq.put("FILE_EXT", fileExt);
        uploadFileReq.put("FILE_CONTENT", fileContent); //必填
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("ACCEPTANCE_ORDER_DOWNLOAD_REQ", uploadFileReq);
        String result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.UPLOAD_FILE, uniBssBody, null);
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.UPLOAD_FILE.getServiceCode(), "附件上传接口处理失败！", "");
        }
        Map<String, Object> resultMap = LocalTokenUtil
            .checkRespParamAndGetObject(result, "ORDER_CENTER_FILE_UPLOAD_RSP", Map.class);
        return resultMap;
    }

    @Override
    public Map<String, Object> orderCenterPathVariable(String requestParam) {
        Map<String, Object> requestMap = JSONObject
            .parseObject(JsonUtils.transKeyToUpperCaseObject(requestParam).toJSONString(), Map.class);
        acceptStaffReplenishForPathVariable(requestMap);
        Map<String, Object> pathVariableReq = new HashMap<>();
        pathVariableReq.put("PATH_VARIABLE_REQ", requestMap);

        // 获取服务配置信息
        IOrderQueryService orderQueryService = SpringUtil.getBean(IOrderQueryService.class);
        ICuccQueryInfService cuccQueryInfService = SpringUtil.getBean(ICuccQueryInfService.class);
        InfService infService = orderQueryService
            .queryServiceBySvcCode(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(),
                LocalCallClientEnum.INF_COMMON_URL.getCenterCode());

        if (infService == null) {
            ErrorConsts.SERVICE_UNREGISTERED.throwOut(
                LocalCallClientEnum.INF_COMMON_URL.getCenterCode() + ":"
                    + LocalCallClientEnum.INF_COMMON_URL.getServiceCode());
        }
        Map<String, String> headerMap = LocalTokenUtil.getHeaderMap();
        if (headerMap == null) {
            headerMap = new HashMap<String, String>();
        }
        headerMap.put("Cookie", "SESSION=" + ContextUtil.getHttpSessoinId());

        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "json_jike_orderCenter_pathVariable");
        dealTransId(pathVariableReq);
        request.put("UNI_BSS_BODY", pathVariableReq);
        InfServiceHelper.adaptGray(request, pathVariableReq);

        String result = null;
        if (GeneralSwitchUtils.isSwitchOpened("STRESS_TEST")) {
            result = "{\"UNI_BSS_HEAD\":{\"RESP_DESC\":\"Success\",\"RESP_CODE\":\"00000\"},\"UNI_BSS_BODY\":{\"PATH_VARIABLE_RSP\":{\"DATA\":2102221000071000,\"MESSAGE\":\"访问成功\",\"STATUS\":0}}}";
        }
        else {
            if (KiteStringUtils.isEqual(mode, "http")) {
                result = KiteHttpsUtils
                    .doPostWithObjectSetLog(null, cuccQueryInfService.getUrlByType(infService), headerMap,
                        request, new HashMap<>());
            }
            else {
                InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
                result = infExchangeService.exchange(new JSONObject(request));
            }
        }
        return JSON.parseObject(result, Map.class);
    }

    private Map<String, Object> dealTransId(Map<String, Object> pathVariableReq){
    	Map<String, Object> result = LocalTokenUtil.getParamMap(pathVariableReq);
        Map<String, Object> uniBssBody = KiteMapUtils.getValue(result, "UNI_BSS_BODY");
        Map<String, Object> pathVarReq = KiteMapUtils.getValue(uniBssBody, "PATH_VARIABLE_REQ");
        Map<String, Object> req = KiteMapUtils.getValue(pathVarReq, "REQUEST");
        Map<String, Object> uniBssHead = KiteMapUtils.getValue(result, "UNI_BSS_HEAD");
        String transId = KiteMapUtils.getString(uniBssHead, "TRANS_ID");
        req.put("SERIAL_NO", transId);
    	return result;
    }

    @Override
    public List<QryIOTOppoDockingSalesRsp> queryIOTOppoDockingSales(String custId) {
        Map<String, Object> oppoRequestParam = new HashMap<>();
        oppoRequestParam.put("custId", custId);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("IOT_OPPO_DOCKING_SALES_REQ", oppoRequestParam);
        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "json_GEinnovationHeadlines_opposf_iotOppoDockingSales");
        request.put("UNI_BSS_BODY", uniBssBody);
        InfServiceHelper.adaptGray( request, oppoRequestParam);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }

        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "商机查询服务处理失败！", "");
        }
        Map<?, ?> responeMap = LocalTokenUtil
            .checkRespParamAndGetObject(result, "IOT_OPPO_DOCKING_SALES_RSP", Map.class);
        if (!KiteStringUtils
            .equals(KiteMapUtils.getString(responeMap, "code"), LocalInfConsts.UNI_BSS_BODY_RESULT_SUCCESS)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_GEinnovationHeadlines_opposf_iotOppoDockingSales",KiteMapUtils.getString(responeMap, "RESULT_MSG"));
        }
        List<QryIOTOppoDockingSalesRsp> list = JsonUtils
            .parseArray(KiteMapUtils.getString(responeMap, "data"), QryIOTOppoDockingSalesRsp.class);
        return list;
    }

    @Override
    public Map<String, Object> orderCenterUpdatePiece(KitePosDTO posDto, String custId, String orderId) {
        Map<String, Object> uniBssBody = new HashMap<>();
        JSONObject posJSONObject = JsonUtils.parseObject(JSONObject.toJSONString(posDto));
        replaceKey(posJSONObject.get("request"), "aPP_ID", "APP_ID");
        removeKey(posJSONObject.get("accounts"), "acctContractCode", "isCenterDirectSign", "isDefault", "openDate",
            "provinceAcctId");

        JSONArray accounts = (JSONArray) posJSONObject.get("accounts");
        accounts.forEach(account -> {
            JSONObject accountObject = (JSONObject) account;
            if (KiteStringUtils.isEmpty(KiteMapUtils.getString(accountObject, "custId"))) {
                accountObject.put("custId", custId);
            }
        });

        JSONArray contracts = (JSONArray) posJSONObject.get("contract");
        contracts.forEach(contract -> {
            removeKey(((JSONObject) contract).get("attachments"), "uploadTime");
        });

        JSONArray users = (JSONArray) posJSONObject.get("users");
        users.forEach(user -> {
            JSONObject userObject = (JSONObject) user;
            if (KiteStringUtils.isEmpty(KiteMapUtils.getString(userObject, "useCustInstId"))) {
                userObject.put("useCustInstId", KiteMapUtils.getString(userObject, "instanceId"));
            }
        });

        JSONObject useCustomer = (JSONObject) posJSONObject.get("useCustomer");
        if (Objects.nonNull(useCustomer)) {
            useCustomer.put("isNewCustomer", KiteStringUtils.valueOf(useCustomer.get("isNewCustomer")));
            posJSONObject.put("useCustomer", Arrays.asList(useCustomer));
        }

        JSONObject customer = (JSONObject) posJSONObject.get("customer");
        customer.put("isNewCustomer", KiteStringUtils.valueOf(customer.get("isNewCustomer")));
        if (KiteStringUtils.isNotEmpty(customer.getString("contactPhone"))
            && customer.getString("contactPhone").length() > 11) {
            removeKey(customer, "contactPhone");
        }

        JSONObject order = (JSONObject) posJSONObject.get("order");
        if (KiteStringUtils.isNotEmpty(order.getString("flowNodeId")) && order.getString("flowNodeId").length() > 32) {
            removeKey(order, "flowNodeId");
        }
        //更新接口不允许修改flowControl节点
        removeKey(order, "flowControl");

        JSONArray goods = (JSONArray) posJSONObject.get("goods");
        goods.forEach(good -> {
            Object count = ((JSONObject) good).get("count");
            ((JSONObject) good).put("count", KiteStringUtils.valueOf(count));
        });

        removeKey(posJSONObject.get("payments"), "deadline");
        JSONArray payments = (JSONArray) posJSONObject.get("payments");
        payments.forEach(payment -> {
            Object amount = ((JSONObject) payment).get("amount");
            ((JSONObject) payment).put("amount", KiteStringUtils.valueOf(amount));
            //            JSONArray channels = (JSONArray) ((JSONObject) payment).get("channel");
            //            ((JSONObject) payment).put("channel", channels.get(0));
        });

        //removeJSONObjectByKey(posJSONObject, "attrs", "changeType", "endDate", "originValue", "startDate", "type");
        //removeJSONObjectByKey(posJSONObject, "attachments", "uploadTime");

        posJSONObject.put("orderId", orderId);
        uniBssBody.put("UPDATE_PIECE_REQ", posJSONObject);
        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "json_jike_orderCenter_UpdatePiece");
        request.put("UNI_BSS_BODY", uniBssBody);
        InfServiceHelper.adaptGray( request, posJSONObject);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        return JSON.parseObject(result, Map.class);
    }

    private void replaceKey(Object obj, String sourceKey, String targetKey) {
        if (Objects.isNull(obj)) {
            return;
        }
        if (obj instanceof JSONObject) {
            JSONObject jsonObject = (JSONObject) obj;
            Object value = jsonObject.get(sourceKey);
            jsonObject.remove(sourceKey);
            jsonObject.put(targetKey, value);
        }
        if (obj instanceof JSONArray) {
            JSONArray jsonArray = (JSONArray) obj;
            jsonArray.forEach(t -> {
                JSONObject jsonObject = (JSONObject) t;
                Object value = jsonObject.get(sourceKey);
                jsonObject.remove(sourceKey);
                jsonObject.put(targetKey, value);
            });
        }
    }

    private void removeKey(Object obj, String... sourceKeys) {
        if (Objects.isNull(obj)) {
            return;
        }
        if (obj instanceof JSONObject) {
            JSONObject jsonObject = (JSONObject) obj;
            Arrays.asList(sourceKeys).forEach(sourceKey -> {
                jsonObject.remove(sourceKey);
            });
        }
        if (obj instanceof JSONArray) {
            JSONArray jsonArray = (JSONArray) obj;
            jsonArray.forEach(t -> {
                JSONObject jsonObject = (JSONObject) t;
                Arrays.asList(sourceKeys).forEach(sourceKey -> {
                    jsonObject.remove(sourceKey);
                });
            });
        }
    }

    public void removeJSONObjectByKey(JSONObject jsonObject, String outKey, String... removeKeys) {
        if (KiteMapUtils.isEmpty(jsonObject)) {
            return;
        }
        jsonObject.forEach((key, value) -> {
            if (KiteStringUtils.equals(outKey, key)) {
                this.removeKey(value, removeKeys);
            }
            else if (value instanceof JSONObject) {
                removeJSONObjectByKey((JSONObject) value, outKey, removeKeys);
            }
            else if (value instanceof JSONArray) {
                dealRemoveJSONArray((JSONArray) value, outKey, removeKeys);
            }
        });
    }

    private void dealRemoveJSONArray(JSONArray jsonArray, String outKey, String... removeKeys) {
        jsonArray.stream().forEach(jsonObject -> {
            if (jsonObject instanceof JSONObject) {
                removeJSONObjectByKey((JSONObject) jsonObject, outKey, removeKeys);
            }
            else if (jsonObject instanceof JSONArray) {
                dealRemoveJSONArray((JSONArray) jsonObject, outKey, removeKeys);
            }
        });
    }

    @Override
    public Map<String, Object> batchQryCustAccounts(String isCenterDirectSign, String custId, String custProvinceCode) {
        LoginInfo loginInfo = ContextUtil.getLoginInfo();

        Map<String, Object> batchQryCustAcountSeq = new HashMap<>();

        Map<String, Object> tcpCont = new HashMap<>();
        tcpCont.put("APP_KEY", LocalInfConsts.APP_ID);
        tcpCont.put("TRANSACION_ID", LocalTokenUtil.getTransId());
        batchQryCustAcountSeq.put("TCP_CONT", tcpCont);
        String staffCode = (String) ContextUtil.getLoginInfo().getUserInfo().getExtParams().get("account");

        Map<String, Object> operUserInfo = new HashMap<>();
        operUserInfo.put("STAFF_ID", ContextUtil.getUserId().toString());
        operUserInfo.put("USER_CODE",staffCode);
        operUserInfo.put("USER_ORG_ID", loginInfo.getOrgInfo().getOrgId().toString());
        batchQryCustAcountSeq.put("OPER_USER_INFO", operUserInfo);

        batchQryCustAcountSeq.put("IS_CENTER_DIRECT_SIGN", isCenterDirectSign);
        batchQryCustAcountSeq.put("QRY_TYPE", "4"); // 查询账户列表+详情+托收信息+邮寄地址信息

        Map<String, Object> custInfo = new HashMap<>();
        custInfo.put("CUST_ID", custId);
        custInfo.put("PROVINCE_CODE", custProvinceCode);
        batchQryCustAcountSeq.put("CUST_INFOS", Arrays.asList(custInfo));
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("BATCH_QRY_CUST_ACCOUNTS_REQ", batchQryCustAcountSeq);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "BATCH_QRY_CUST_ACCOUNTS");
        InfServiceHelper.adaptGray( request, batchQryCustAcountSeq);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "批量查询客户账户信息服务处理失败！", "");
        }
        Map<String, Object> resultMap = LocalTokenUtil
            .checkRespParamAndGetObject(result, "BATCH_QRY_CUST_ACCOUNTS_RSP", Map.class);
        return resultMap;
    }

    @Override
    public Map<String, Object> queryCustIOTInfos(String custId, String provinceId, int pageNum, int pageSize) {
        Map<String, Object> iotCustReq = new HashMap<>();
        iotCustReq.put("PAGE_SIZE", 1); //必填
        iotCustReq.put("PAGE_NUM", 1);
        iotCustReq.put("PROVINCE_CODE", provinceId); //必填
        iotCustReq.put("CUST_ID", custId); //必填

        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("QRY_CUST_IOT_INFO_LIST_REQ", iotCustReq);

        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "QRY_CUST_IOT_INFO_LIST");
        InfServiceHelper.adaptGray( request, iotCustReq);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        return JsonUtils.parseObject(result, Map.class);
    }

    @Override
    public String queryDeveloChannelName(String channelId, String ProvinceCode) {
        Map<String, Object> channelInfo = this.queryDeveloChannelInfo(channelId, ProvinceCode);
        return KiteMapUtils.getString(channelInfo, "CHNL_NAME");
    }
    //批量和单查
     private  String queryDeveloChannelStr(String channelId, String ProvinceCode){
        String chnlName = "";
        LoginInfo loginInfo = ContextUtil.getLoginInfo();
        Map<String, Object> chnlLocation = new HashMap<>();
        if (KiteStringUtils.isEmpty(ProvinceCode)) {
            chnlLocation.put("PROVINCE_CODE", loginInfo.getUserInfo().getPostProvinceNbr());
        }
        else {
            chnlLocation.put("PROVINCE_CODE", ProvinceCode);
        }
        Integer pageSize = 1;
        if(channelId.contains(",")){//批量
            pageSize = channelId.split(",").length;
        }
        Map<String, Object> batchQryChannelInfoReq = new HashMap<>();
        batchQryChannelInfoReq.put("PAGE_SIZE", pageSize);
        batchQryChannelInfoReq.put("PAGE_NUM", 1);
        batchQryChannelInfoReq.put("QRY_TYPE", "1");
        batchQryChannelInfoReq.put("CONTENT_TYPE", "1");
        batchQryChannelInfoReq.put("CHNL_CODES", channelId);
        batchQryChannelInfoReq.put("CHNL_LOCATION", chnlLocation);

        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("BATCH_QRY_CHANNEL_INFO_REQ", batchQryChannelInfoReq);

        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "BATCH_QRY_CHANNEL_INFO");
        request.put("UNI_BSS_BODY", uniBssBody);
        InfServiceHelper.adaptGray( request, batchQryChannelInfoReq);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        return result;
    }
    @Override
    public Map<String, Object> queryDeveloChannelInfo(String channelId, String ProvinceCode) {
        String result = this.queryDeveloChannelStr(channelId,ProvinceCode);
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> channelMap = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(channelMap, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(channelMap, "UNI_BSS_BODY");
                JSONObject batchQryChannelInfoRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "BATCH_QRY_CHANNEL_INFO_RSP");
                JSONArray dataList = KiteMapUtils.getValue(batchQryChannelInfoRsp, "DATA_LIST");
                if (KiteListUtils.isNotEmpty(dataList)) {
                    Map<String, String> dataMap = (Map<String, String>) dataList.get(0);
                    JSONObject channelInfo = KiteMapUtils.getValue(dataMap, "CHANNEL_INFO");
                    return channelInfo;
                }
            }
        }
        return new HashMap<>();
    }
    @Override
    public Map<String, Object> batchQueryDeveloChannelInfo(String channelId, String ProvinceCode) {
        Map res = new HashMap();
        String result = this.queryDeveloChannelStr(channelId,ProvinceCode);
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> channelMap = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(channelMap, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(channelMap, "UNI_BSS_BODY");
                JSONObject batchQryChannelInfoRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "BATCH_QRY_CHANNEL_INFO_RSP");
                JSONArray dataList = KiteMapUtils.getValue(batchQryChannelInfoRsp, "DATA_LIST");
                if(KiteListUtils.isNotEmpty(dataList)){
                    dataList.forEach(data->{
                        JSONObject dataobj = JSONObject.parseObject(JSON.toJSONString(data)).getJSONObject("CHANNEL_INFO");
                        res.put(dataobj.getString("CHNL_CODE"),dataobj);
                    });
                }
            }
        }
        return res;
    }

    @Override
    public JSONObject qryHoliday(String provinceCode, String startDate, String offset) {
        Map<String,Object> uniBssBody = new HashMap<>();
        Map<String,Object> holiday = new HashMap<>();
        holiday.put("PROVINCE_NAME",provinceCode);
        holiday.put("START_DATE",startDate);
        holiday.put("IS_ADD","true");
        holiday.put("TIME",offset);
        uniBssBody.put("QRY_HOLIDAY_REQ",holiday);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_operationPlatform_qryHoliday");
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> resp = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(resp, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(resp, "UNI_BSS_BODY");
                JSONObject holidayRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "QRY_HOLIDAY_RSP");
                if(!holidayRsp.isEmpty()){
                    return holidayRsp;
                }
            }
        }
        return new JSONObject();
    }
    @Override
    public JSONObject qrySettlementAccount(String IB_OB) {
        Map<String,Object> uniBssBody = new HashMap<>();
        Map<String,Object> qry = new HashMap<>();
        IB_OB=null==IB_OB?"OB":IB_OB;
        qry.put("IB_OR_OB",IB_OB);
        uniBssBody.put("QRY_SETTLEMENT_ACCOUNT_REQ",qry);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_operationPlatform_qrySettlementAccount");
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> resp = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(resp, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(resp, "UNI_BSS_BODY");
                JSONObject qryRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "QRY_SETTLEMENT_ACCOUNT_RSP");
                if(!qryRsp.isEmpty()){
                    return qryRsp;
                }
            }
        }
        return new JSONObject();
    }
    @Override
    public JSONObject qryPopData(String countryCode) {
        Map<String, Object> uniBssBody = new HashMap<>();
        Map<String, Object> popDataReq = new HashMap<>();
        Map<String, String> tcpCont = new HashMap<>();
        tcpCont.put("APP_KEY", LocalInfConsts.APP_ID);
        tcpCont.put("TRANSACION_ID", LocalTokenUtil.getTransId());
        popDataReq.put("TCP_CONT", tcpCont);
        if(null!=countryCode){
            popDataReq.put("COUNTRY_CODE", countryCode);
        }
        uniBssBody.put("POP_DATA_REQ", popDataReq);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_operationPlatform_qryPopData");
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> resp = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(resp, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(resp, "UNI_BSS_BODY");
                JSONObject qryRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "POP_DATA_RSP");
                if(!qryRsp.isEmpty()){
                    return KiteMapUtils
                        .getValue(qryRsp, "RESULT_D_T_O");
                }
            }
        }
        return new JSONObject();
    }
    @Override
    public JSONObject operationPlatform() {
        Map<String,Object> uniBssBody = new HashMap<>();
        Map<String,Object> qry = new HashMap<>();
        uniBssBody.put("QRY_CARRIER_DATA_REQ",qry);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_operationPlatform_qryCarrierData");
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> resp = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(resp, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(resp, "UNI_BSS_BODY");
                JSONObject qryRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "QRY_CARRIER_DATA_RSP");
                if(!qryRsp.isEmpty()){
                    return qryRsp;
                }
            }
        }
        return new JSONObject();
    }
    @Override
    public JSONObject queryGovEnterpriseOrg(String type,String value) {
        Map<String,Object> uniBssBody = new HashMap<>();
        Map<String,Object> qry = new HashMap<>();
        qry.put("QRY_TYPE",type);
        qry.put("QRY_VALUE",value);
        uniBssBody.put("QUERY_GOV_ENTERPRISE_ORG_REQ",qry);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_operationPlatform_queryGovEnterpriseOrg");
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> resp = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(resp, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(resp, "UNI_BSS_BODY");
                JSONObject qryRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "QUERY_GOV_ENTERPRISE_ORG_RSP");
                if(!qryRsp.isEmpty()){
                    return qryRsp;
                }
            }
        }
        return new JSONObject();
    }
    public JSONObject queryOrgInfo(String orgCode,String provinceCode,String cityCode,String level) {
        Map<String,Object> uniBssBody = new HashMap<>();
        Map<String,Object> qry = new HashMap<>();
        if(StringUtils.isNotEmpty(orgCode)){
            qry.put("ORG_CODE",orgCode);
        }
        if(StringUtils.isNotEmpty(provinceCode)){
            qry.put("PROVINCE_CODE",provinceCode);
        }
        if(StringUtils.isNotEmpty(cityCode)){
            qry.put("CITY_CODE",cityCode);
        }
        if(StringUtils.isNotEmpty(level)){
            qry.put("OUCLASS_CODE",level);
        }
        qry.put("PAGE_NUM","1");
        qry.put("PAGE_SIZE","1000");
        uniBssBody.put("QUERY_ORG_INFO_REQ",qry);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_GEoperationPlatform_EmpUserInfoService_queryOrgInfo");
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> resp = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(resp, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(resp, "UNI_BSS_BODY");
                JSONObject qryRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "QUERY_ORG_INFO_RSP");
                if(!qryRsp.isEmpty()){
                    JSONObject resultVO =KiteMapUtils.getValue(qryRsp, "RESULT_V_O");
                    return KiteMapUtils.getValue(resultVO, "DATA");
                }
            }
        }
        return new JSONObject();
    }

    @Override
    public UserQueryDTO queryUserList(Map<String, String> paramMap) {
        String userName = KiteMapUtils.getString(paramMap, "userName");
        String accNum = KiteMapUtils.getString(paramMap, "accNum");
        String custId = KiteMapUtils.getString(paramMap, "custId");
        String pageNum = KiteMapUtils.getString(paramMap, "pageNum");
        String pageSize = KiteMapUtils.getString(paramMap, "pageSize");
        String eparchyCode = KiteMapUtils.getString(paramMap, "eparchyCode");
        String provinceCode = KiteMapUtils.getString(paramMap, "provinceCode");
        String openStaffId = KiteMapUtils.getString(paramMap, "openStaffId");
        String userDiffCode = KiteMapUtils.getString(paramMap, "userDiffCode");

        UserQueryDTO userQueryDto = new UserQueryDTO();
        // FIXME: 工号相关信息不一定是当前登录工号信息，等用户中心接口落地了应该做出修改
        //省份编码
        if (KiteStringUtils.isEmpty(eparchyCode)) {
            eparchyCode = ContextUtil.getLoginInfo().getUserInfo().getPostLanId();
        }
        if (KiteStringUtils.isEmpty(provinceCode)) {
            provinceCode = ContextUtil.getLoginInfo().getUserInfo().getPostProvinceNbr();
        }

        // FIXME: 查询老集客必须要传custId。但是，本来是想通过业务号码去查用户列表，在这里却要先查用户详情？需整改。
        if (KiteStringUtils.isNotEmpty(accNum) && KiteStringUtils.isEmpty(custId)) {
            Map<String, Object> inMap = new HashMap<>();
            inMap.put("accNum", accNum);
            inMap.put("eparchyCode", eparchyCode);
            inMap.put("provinceCode", provinceCode);
            inMap.put("staffCode", ContextUtil.getLoginInfo().getStaffInfo().getStaffCode());
            Map<String, Object> rspMap = queryUserDetail(inMap, Lists.newArrayList(UserDetailTagName.USER));
            Map<String, Object> userInfoMap = (Map<String, Object>) rspMap.get("USER_INFO");
            if (KiteMapUtils.isEmpty(userInfoMap)) {
                ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_QryUserDetailServiceApi_qryUserDetailInfo","接口返回报文缺少USER_INFO节点信息!");
            }
            custId = KiteMapUtils.getString(userInfoMap, "CUST_ID");
        }
        pageNum = !KiteStringUtils.isEmpty(pageNum) ? pageNum : "1";
        pageSize = !KiteStringUtils.isEmpty(pageSize) ? pageSize : "10";
        Integer intpageNum = Integer.parseInt(pageNum);
        Integer intPageSize = Integer.parseInt(pageSize);
        Map<String, Object> requestMap = new HashMap<String, Object>();
        requestMap.put("OP_CODE", "json_bbssUserCenter_SalBusaGrpUserSerApi_qryGrpUserList");
        Map<String, Object> uniBssBodyMap = new HashMap<String, Object>();
        Map<String, Object> reqMap = new HashMap<String, Object>();
        reqMap.put("USER_NAME", userName);
        reqMap.put("PROVINCE_CODE", provinceCode);
        reqMap.put("QRY_TYPE", "2");
        reqMap.put("SERVICE_TYPE_CODE", "");
        reqMap.put("OPEN_STAFF_ID", openStaffId);
        reqMap.put("PAGE_NUM", pageNum);
        reqMap.put("PAGE_SIZE", pageSize);
        reqMap.put("SERIAL_NUMBER", accNum);
        // CUST_ID不为空则可以查老集客
        if (KiteStringUtils.isNotEmpty(custId)) {
            reqMap.put("CUST_ID", custId);
            reqMap.put("QRY_SOURCE", "1");
        }
        else {
            reqMap.put("QRY_SOURCE", "2");
        }
        //国际业务云业务受理针对省级不传地市编码，只查用户中心
        //组织信息
        OrgInfo orgInfo=ContextUtil.getLoginInfo().getOrgInfo();
        if(!KiteObjectUtils.isEmpty(orgInfo)&&orgInfo.getOrgLevel()!=null&&orgInfo.getOrgLevel()==10){
            reqMap.replace("QRY_SOURCE", "2");
        }

        if (KiteStringUtils.isNotEmpty(userDiffCode)) {
            reqMap.put("USER_DIFF_CODE", userDiffCode);
        }
        //tcpCont
        Map<String, String> tcpContMap = new HashMap<String, String>();
        tcpContMap.put("APP_KEY", "");
        tcpContMap.put("TRANS_ID", "");
        reqMap.put("TCP_CONT", tcpContMap);

        //para
        List<Map<String, String>> para = new ArrayList<Map<String, String>>();
        reqMap.put("PARA", para);
        uniBssBodyMap.put("REQ", reqMap);
        requestMap.put("UNI_BSS_BODY", uniBssBodyMap);
        InfServiceHelper.adaptGray( requestMap, reqMap);

        Map map;
        if (KiteStringUtils.isEqual(mode, "http")) {
            map = HttpsCallClient.postObjMap(LocalCallClientEnum.QRY_PRODINST_LIST.getCenterCode(),
                LocalCallClientEnum.QRY_PRODINST_LIST.getServiceCode(), requestMap, null);
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            String resultStr = infExchangeService.exchange(new JSONObject(requestMap));
            map = JSON.parseObject(resultStr, Map.class);
        }

        Map<String, Object> unibssHeadMap = (Map<String, Object>) map.get("UNI_BSS_HEAD");
        if (!KiteStringUtils.equals(KiteMapUtils.getString(unibssHeadMap, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_SalBusaGrpUserSerApi_qryGrpUserList",KiteMapUtils.getString(unibssHeadMap, "RESP_DESC"));
        }

        Map<String, Object> rspUniBssBodyMap = (Map<String, Object>) map.get("UNI_BSS_BODY");

        if (KiteMapUtils.isEmpty(rspUniBssBodyMap)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_SalBusaGrpUserSerApi_qryGrpUserList","返回报文缺少UNI_BSS_BODY节点");
        }
        Map<String, Object> rspMap = (Map<String, Object>) rspUniBssBodyMap.get("RSP");
        if (!KiteStringUtils.equals(KiteMapUtils.getString(rspMap, "RSP_CODE"), "0000")) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_SalBusaGrpUserSerApi_qryGrpUserList",KiteMapUtils.getString(rspMap, "RSP_DESC"));
        }
        Map<String, Object> qryGrpUserListMap = (Map<String, Object>) rspMap.get("QRY_GRP_USER_LIST_RSP_BODY");
        Integer rowCount = KiteMapUtils.getInteger(qryGrpUserListMap, "ROW_COUNT");

        List<JSONObject> groupUserList = (List<JSONObject>) qryGrpUserListMap.get("GROUP_USER_LIST");

        List<ProdInstQryDTO> prodInstDtoList = new ArrayList<ProdInstQryDTO>();

        if (KiteListUtils.isNotEmpty(groupUserList)) {
            groupUserList.forEach(item -> {
                ProdInstQryDTO prodInstQryDto = JSON.parseObject(item.toJSONString(), ProdInstQryDTO.class);

                //开户时间处理
                String openDate = prodInstQryDto.getOpen_date();
                Date dOpenDate = DateUtil.strToDate(openDate);
                openDate = DateUtil.format(dOpenDate);
                prodInstQryDto.setOpen_date(openDate);

                prodInstDtoList.add(prodInstQryDto);
            });
        }
        if (!Objects.nonNull(rowCount)) {
            rowCount = prodInstDtoList.size();
        }
        //处理分页信息
        PageInfo<ProdInstQryDTO> resultPageInfo = new PageInfo<ProdInstQryDTO>();
        resultPageInfo.setList(prodInstDtoList);
        resultPageInfo.setPageNum(intpageNum);
        resultPageInfo.setPageSize(intPageSize);
        resultPageInfo.setTotal(rowCount);
        int pages = rowCount / intPageSize;
        if (rowCount % intPageSize != 0) {
            pages++;
        }
        resultPageInfo.setPages(pages);
        userQueryDto.setUserList(resultPageInfo);
        return userQueryDto;
    }

    @Override
    public Map<String, Object> queryUserDetail(Map<String, Object> inMap, List<UserDetailTagName> userDetailTagNames) {
        if (KiteListUtils.isEmpty(userDetailTagNames)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_QryUserDetailServiceApi_qryUserDetailInfo","TAG_NAME不可为空");
        }
        String provinceCode = KiteMapUtils.getString(inMap, "provinceCode");
        String eparchyCode = KiteMapUtils.getString(inMap, "eparchyCode");
        String staffCode = (String) ContextUtil.getLoginInfo().getUserInfo().getExtParams().get("account");
        String accNum = KiteMapUtils.getString(inMap, "accNum");
        String userId = KiteMapUtils.getString(inMap, "userId");

        Map<String, Object> uniBssBodyMap = new HashMap<String, Object>();
        Map<String, Object> reqMap = new HashMap<String, Object>();
        //tcp_cont
        Map<String, String> tcpContMap = new HashMap<String, String>();
        tcpContMap.put("APP_KEY", LocalInfConsts.APP_ID);
        tcpContMap.put("TRANS_ID", LocalTokenUtil.getTransId());
        reqMap.put("TCP_CONT", tcpContMap);
        // 省份编码(适配老销售)只查用户中心可不传递
        reqMap.put("PROVINCE_CODE", provinceCode);
        // 地市编码(适配老销售)只查用户中心可不传递
        //国际工号，地市编码特殊处理
//        if(KiteStringUtils.isNotEmpty(provinceCode)&&provinceCode.startsWith("49")){
//            reqMap.put("EPARCHY_CODE", "499");
//        }else {
            reqMap.put("EPARCHY_CODE", eparchyCode);
//        }

        //云业务针对省级工号不传地市编码，只查用户中心
        OrgInfo orgInfo=ContextUtil.getLoginInfo().getOrgInfo();
        if(!KiteObjectUtils.isEmpty(orgInfo)&&orgInfo.getOrgLevel()!=null&&orgInfo.getOrgLevel()==10){
            reqMap.remove("EPARCHY_CODE");
            reqMap.put("USER_SOURCE", "2");
        }
//        if(KiteStringUtils.isNotEmpty(provinceCode)&&provinceCode.startsWith("49")){
//            reqMap.remove("EPARCHY_CODE");
//            reqMap.put("USER_SOURCE", "2");
//
//        }
        // 员工工号（适配老销售）只查用户中心可不传递
        reqMap.put("STAFF_CODE", staffCode);
        // 服务号码（业务号码、用户标识二选一必填）
        reqMap.put("SERIAL_NUMBER", accNum);
        // 用户标识（业务号码、用户标识二选一必填）
        reqMap.put("USER_ID", userId);
        List<Map<String, String>> qryTagInfoList = new ArrayList<>();
        for (UserDetailTagName userDetailTagName : userDetailTagNames) {
            Map<String, String> qryTagInfo = new HashMap<>();
            qryTagInfo.put("TRANSLATE_FLAG", "1");
            qryTagInfo.put("VALID_FLAG", "1");
            qryTagInfo.put("TAG_NAME", userDetailTagName.name());
            qryTagInfoList.add(qryTagInfo);
        }
        reqMap.put("QRY_TAG_INFOS", qryTagInfoList);
        uniBssBodyMap.put("REQ", reqMap);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("OP_CODE", "json_bbssUserCenter_QryUserDetailServiceApi_qryUserDetailInfo");
        InfServiceHelper.adaptGray( requestMap, reqMap);

        //调接口查询用户详情信息
        Map rsp;
        if (KiteStringUtils.isEqual(mode, "http")) {
            rsp = HttpsCallClient.postObjMap(LocalCallClientEnum.INF_COMMON_URL.getCenterCode(),
                LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), requestMap, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            String resultStr = infExchangeService.exchange(new JSONObject(requestMap));
            rsp = JSON.parseObject(resultStr, Map.class);
        }

        Map<String, Object> uniBssHead = (Map<String, Object>) rsp.get("UNI_BSS_HEAD");
        if (!KiteStringUtils.equals(LocalInfConsts.RESP_SUCCESS, KiteMapUtils.getString(uniBssHead, "RESP_CODE"))) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_QryUserDetailServiceApi_qryUserDetailInfo",KiteMapUtils.getString(uniBssHead, "RESP_DESC"));
        }
        Map<String, Object> rspUniBssBodyMap = (Map<String, Object>) rsp.get("UNI_BSS_BODY");
        if (KiteMapUtils.isEmpty(rspUniBssBodyMap)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_QryUserDetailServiceApi_qryUserDetailInfo","接口返回报文缺少UNI_BSS_BODY节点信息!");
        }

        Map<String, Object> rspMap = (Map<String, Object>) rspUniBssBodyMap.get("RSP");
        if (!KiteStringUtils.equals("0000", KiteMapUtils.getString(rspMap, "RESP_CODE"))) {
            if (KiteStringUtils.equals("8888", KiteMapUtils.getString(rspMap, "RESP_CODE"))) {
                return null;
            }
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_bbssUserCenter_QryUserDetailServiceApi_qryUserDetailInfo",KiteMapUtils.getString(rspMap, "RESP_DESC"));
        }
        return rspMap;
    }

    @Override
    public Map<String, Object> queryWorkSheetsMergeInf(String orderId, String flowId) {
        Map<String, Object> inParamMap = new HashMap<>();
        inParamMap.put("orderId", orderId);
        inParamMap.put("flowId", flowId);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("GET_WORKSHEETS_MERGE_REQ", inParamMap);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_orderCenter_getWorksheetsMerge");
        InfServiceHelper.adaptGray( request, inParamMap);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isNotEmpty(resultBodyMap)) {
            return KiteMapUtils.getMap(resultBodyMap ,"GET_WORKSHEETS_MERGE_RSP");
        }
        return null;
    }

    @Override
    public List<Map<String, Object>> queryWorkSheetsMerge(String orderId, String flowId) {
        Map<String, Object> rspMap = queryWorkSheetsMergeInf(orderId, flowId);
        if (KiteMapUtils.isEmpty(rspMap)) {
            return null;
        }
        // 没有合并代办/没有拆单，返回当前订单和工单
        if (KeyConsts.IFTRUE_1.equals(rspMap.get("status").toString())) {
            Map<String, Object> dataMap = new HashMap<>();
            dataMap.put("orderId", orderId);
            dataMap.put("flowId", flowId);

            List<Map<String, Object>> results = Lists.newArrayList();
            results.add(dataMap);
            return results;
        }
        // relationRoleList = (List<Map<String, Object>>) rspMap.get("RELATION_ROLE_LIST");
        Map<String, Object> dataMap = (Map<String, Object>)rspMap.get("data");
        if (KiteMapUtils.isNotEmpty(dataMap)) {
            return KiteMapUtils.getValue(dataMap, "workSheetData");
        }
        return null;
    }

    @Override
    public List<Map<String, Object>> queryRelationRoles(String offerCategoryId, String relationKind) {
        Map<String, Object> inParamMap = new HashMap<>();
        inParamMap.put("PRIMARY_GOODS_CLASSIFY_ID", offerCategoryId);
        inParamMap.put("RELATION_KIND", relationKind);

        Map<String, Object> tcpCont = new HashMap<>();
        tcpCont.put("APP_KEY",LocalInfConsts.LOGIN_APP_ID);
        tcpCont.put("TRANS_ID", "");
        inParamMap.put("TCP_CONT",tcpCont);


        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("REQ", inParamMap);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_GEuserCenter_RelationRoleServiceApi_getRelationRole");
        InfServiceHelper.adaptGray( request, inParamMap);

        String result;
        List<Map<String, Object>> relationRoleList = new ArrayList<>();
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isNotEmpty(resultBodyMap)) {
            Map<String, Object> rspMap = (Map<String, Object>) resultBodyMap.get("RSP");
            if (KiteMapUtils.isNotEmpty(rspMap)) {
                relationRoleList = (List<Map<String, Object>>) rspMap.get("RELATION_ROLE_LIST");
            }
        }
        return relationRoleList;
    }

    /**
     * Description: <br>
     *
     * @author tengg<br>
     * @taskId <br>
     * @param goodPriceReqDTO
     * @return <br>
     */
    @Override
    public DataResult<Map> queryGoodPrice(GoodPriceReqDTO goodPriceReqDTO) {
        Map uniBssBody = new HashMap();
        Map byGoodCodeReq = KiteMapUtils.beanToMap(goodPriceReqDTO);
        uniBssBody.put("BY_GOOD_CODE_REQ", byGoodCodeReq);
        Map<String, Object> param = LocalTokenUtil.getParamMap(uniBssBody);
        param.put("OP_CODE", "json_jike_orderCenter_byGoodCode");
        InfServiceHelper.adaptGray(param, byGoodCodeReq);
        String resultStr;
        if (KiteStringUtils.isEqual(mode, "http")) {
            resultStr = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL.getCenterCode(),
                LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), param, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            resultStr = infExchangeService.exchange(new JSONObject(param));
        }
        Map<String, Object> result = JSON.parseObject(resultStr, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) result.get("UNI_BSS_BODY");
        Map<String, Object> byGoodCodeRsp = (Map<String, Object>) resultBodyMap.get("BY_GOOD_CODE_RSP");
        if (KiteMapUtils.isEmpty(byGoodCodeRsp)) {
            return ErrorConsts.SUCCESS.getResult(null);
        }
        Map feeMap = (Map) byGoodCodeRsp.get("data");
        return ErrorConsts.SUCCESS.getResult(feeMap);
    }

    @Override
    public Map<String, Object> queryOaAccount() {
        Map<String, Object> inParamMap = new HashMap<>();
        String sessionId = String.valueOf(ContextUtil.getLoginInfo().getUserInfo().getExtParams().get("session_id"));
        inParamMap.put("authSessionId", sessionId);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("QRY_LOGIN_INFO_REQ", inParamMap);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_headquarters_enterpriseOperationPlatform_qryLoginInfo");
        InfServiceHelper.adaptGray( request, inParamMap);

        String result;
        String cuncPersonType = "";
        Map<String, Object> userInfo = new HashMap<>();
        List<Map<String, Object>> relationRoleList = new ArrayList<>();
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isNotEmpty(resultBodyMap)) {
            Map<String, Object> rspMap = (Map<String, Object>) resultBodyMap.get("QRY_LOGIN_INFO_RSP");
            if (KiteMapUtils.isNotEmpty(rspMap)) {
                String resultCode = (String) rspMap.get("resultCode");
                if (KiteStringUtils.equals("0", resultCode)) {
                    Map<String, Object> resultObject = (Map<String, Object>) rspMap.get("resultObject");
                    if (KiteMapUtils.isNotEmpty(resultObject)) {
                        userInfo = (Map<String, Object>) resultObject.get("userInfo");
                    }
                }
            }
        }
        return userInfo;
    }
    @Override
    public Map<String, Object> queryOppInfoList( Map map) {
        Map<String, Object> inParamMap = new HashMap<>();
        Map<String, Object> oppoInfo = new HashMap<>();
        oppoInfo.put("oppoNum",KiteMapUtils.getString(map, "oppoNum"));
        oppoInfo.put("creator",KiteMapUtils.getString(map, "creator"));
        oppoInfo.put("oppoName",KiteMapUtils.getString(map, "oppoName"));
        oppoInfo.put("custName",KiteMapUtils.getString(map, "custName"));
        oppoInfo.put("processStatus",KiteMapUtils.getString(map, "processStatus"));
        oppoInfo.put("page",KiteMapUtils.getString(map, "page"));
        oppoInfo.put("size",KiteMapUtils.getString(map, "size"));
        inParamMap.put("oppoInfo",oppoInfo);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("GET_BIGDATA_OPPORTUNITY_LIST_REQ", inParamMap);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_getBigDataOpportunityDetail_qryOppInfoList");
        InfServiceHelper.adaptGray( request, inParamMap);

        String result;
        Map<String, Object> listMap = new HashMap<>();
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询商机列表失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isNotEmpty(resultBodyMap)) {
            Map<String, Object> rspMap = (Map<String, Object>) resultBodyMap.get("GET_BIGDATA_OPPORTUNITY_LIST_RSP");
            if (KiteMapUtils.isNotEmpty(rspMap)) {
                listMap = (Map) rspMap.get("data");
            }
        }
        return listMap;
    }
    @Override
    public Map<String, Object> queryOppInfodetail( Map map) {
        Map<String, Object> inParamMap = new HashMap<>();
        Map<String, Object> oppoInfo = new HashMap<>();
        oppoInfo.put("oppoNum",KiteMapUtils.getString(map, "oppoNum"));
        inParamMap.put("oppoInfo",oppoInfo);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("GET_BIGDATA_OPPORTUNITY_DETAIL_REQ", inParamMap);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_getBigDataOpportunityDetail_queryOppInfodetail");
        InfServiceHelper.adaptGray( request, inParamMap);

        String result;
        Map<String, Object> detailMap = new HashMap<>();
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询商机详情失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isNotEmpty(resultBodyMap)) {
            detailMap = (Map<String, Object>) resultBodyMap.get("GET_BIGDATA_OPPORTUNITY_DETAIL_RSP");

        }
        return detailMap;
    }

    @Override
    public Map<String, Object> queryNewPartnerQuery( Map map) {
        Map<String, Object> uniBssBody = new HashMap<>();
        Map<String, Object> oppoInfo = new HashMap<>();
        oppoInfo.put("ENT_NAME",KiteMapUtils.getString(map, "ENT_NAME"));
        uniBssBody.put("NEW_PARTNER_QUERY_REQ", oppoInfo);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_getBigDataOpportunityDetail_queryNewPartnerQuery");
        // 没说明调用方式默认HTTP
         InfServiceHelper.adaptGray( request, request);

        String result;
        Map<String, Object> detailMap = new HashMap<>();
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合作伙伴新增接口失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isNotEmpty(resultBodyMap)) {
            detailMap = (Map<String, Object>) resultBodyMap.get("NEW_PARTNER_QUERY_RSP");
        }
        if(KiteMapUtils.isNotEmpty(resultBodyMap)){
            String RESULT_CODE= (String) detailMap.get("RESULT_CODE");
            if(RESULT_CODE.equals("0005")){
               // ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合作伙伴新增接口失败", "");
            }
        }else{
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合作伙伴新增接口失败", "");
        }

        return detailMap;
    }
    @Override
    public Map<String, Object> partnerReuseQuery( Map map) {
        Map<String, Object> uniBssBody = new HashMap<>();
        Map<String, Object> oppoInfo = new HashMap<>();
        oppoInfo.put("BUSINESS_NO", KiteMapUtils.getString(map, "BUSINESS_NO"));
        uniBssBody.put("PARTNER_REUSE_QUERY_REQ",oppoInfo);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_getBigDataOpportunityDetail_partnerReuseQuery");
        // 没说明调用方式默认HTTP
        InfServiceHelper.adaptGray( request, request);

        String result;
        Map<String, Object> detailMap = new HashMap<>();
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合作伙伴复用接口失败", "");
        }
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isNotEmpty(resultBodyMap)) {
            detailMap = (Map<String, Object>) resultBodyMap.get("PARTNER_REUSE_QUERY_RSP");
        }
        if(KiteMapUtils.isNotEmpty(resultBodyMap)){
            String RESULT_CODE= (String) detailMap.get("RESULT_CODE");
            if(RESULT_CODE.equals("0001")){
                ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合作伙伴复用接口失败", "");
            }
        }else{
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询合作伙伴复用接口失败", "");
        }

        return detailMap;
    }
    @Override
    public List<String> queryOpeList(Map map) {
        Map<String, Object> inParamMap = new HashMap<>();
        inParamMap.put("CARRIERID", KiteMapUtils.getString(map, "carrierId"));
        Map<String, Object> uniBssBodyMap = new HashMap<>();
        uniBssBodyMap.put("GET_OPERATIONS_SPECIALIST_REQ", inParamMap);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("OP_CODE", "json_getOperationsSpecialist_queryOpeList");
        // 没说明调用方式默认HTTP
        InfServiceHelper.adaptGray( requestMap, inParamMap);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        List<String> operationsSpecialist = new ArrayList<>();
        Map<String, Object> goodsMap = JSON.parseObject(result, Map.class);
        Map<String, Object> resultBodyMap = (Map<String, Object>) goodsMap.get("UNI_BSS_BODY");
        if (KiteMapUtils.isEmpty(resultBodyMap)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_getOperationsSpecialist_queryOpeList","接口返回报文缺少UNI_BSS_BODY节点信息!");
        }
        Map<String, Object> rspMap = (Map<String, Object>) resultBodyMap.get("GET_OPERATIONS_SPECIALIST_RSP");
        if (KiteMapUtils.isEmpty(rspMap)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_getOperationsSpecialist_queryOpeList","接口返回报文缺少GET_OPERATIONS_SPECIALIST_RSP节点信息!");
        }
        String resultCode = (String) rspMap.get("RESULT_CODE");
        if ("0000".equals(resultCode)) {
            Map<String, Object> rsDataMap = (Map<String, Object>) rspMap.get("RESULT_DATA");
            if (KiteMapUtils.isNotEmpty(rsDataMap)) {
                operationsSpecialist = (List<String>) rsDataMap.get("ACCOUNT_LIST");
            }
        } else {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_getOperationsSpecialist_queryOpeList",KiteMapUtils.getString(rspMap, "RESULT_DESC"));
        }
        return operationsSpecialist;
    }

    @Override
    public String getDownLoadFile(Map map) {
        FtpUtils ftpUtil = new FtpUtils();
        try {
            String fileName = KiteMapUtils.getString(map, "attachLocation");
            //获取sftp相关配置信息
            DcPublic cfg = DcPublicCache.get("202104260949", "ftpAttr");
            if (Objects.isNull(cfg)) {
                ErrorConsts.BUSI_COMMON_ERROR.throwOut("SFTP配置为空或缓存为空！");
            }
            String ftpHost = cfg.getCodea();
            String ftpPort = cfg.getCodeb();
            String ftpUsername = cfg.getCodec();
            String ftpPassword = cfg.getCoded();
            String ftpFilePath = cfg.getCodee();
            JSONObject paramJson = new JSONObject();
            paramJson.put("ftpHost",ftpHost);
            paramJson.put("ftpPort",ftpPort);
            paramJson.put("ftpUsername",ftpUsername);
            paramJson.put("ftpPassword",ftpPassword);
            paramJson.put("ftpFilePath",ftpFilePath);
            paramJson.put("ftpFileName",fileName);
            logger.info("------------------sftp信息参数："+paramJson.toJSONString());
            //连接sftp
            FtpConfig confDown = new FtpConfig();
            confDown.setAddr(ftpHost);
            confDown.setPort(ftpPort);
            confDown.setUsername(ftpUsername);
            confDown.setPassword(ftpPassword);
            ftpUtil.sftpConnection(confDown);
            if(!ftpFilePath.endsWith("/")){
                ftpFilePath += "/";
            }
            //将sftp上的文件转为byte类型
            byte[] bytes = ftpUtil.getSftpBytes(ftpFilePath+fileName);
            logger.info("------------------sftp上获取的文件字节数组信息："+bytes);
            String fileType = KiteStringUtils.substring(fileName, fileName.lastIndexOf('.') + 1);
            //将文件上传到服务
            JSONObject paramJson1 = new JSONObject();
            paramJson1.put("fileName",fileName);
            paramJson1.put("bytes",bytes);
            paramJson1.put("fileType",fileType);
            logger.info("------------------orderCenterFileUpload信息入参："+paramJson1.toJSONString());
            if (bytes != null && bytes.length>0) {
                String fileId = attachmentService.orderCenterFileUpload(fileName, bytes, fileType);
                String resUrl = attachmentService.attachView(fileId, fileName, false);
                /*Map<String, Object> param = new HashMap<>();
                param.put("requestId", LocalTokenUtil.getTransId());
                param.put("sourceMall", "3"); // 来源触点
                param.put("filePath", fileId);
                param.put("wmContent", ""); // 水印内容
                Map<String, Object> uniBssBody = new HashMap<>();
                uniBssBody.put("ATTACHMENT_PREVIEW_REQ", param);
                Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBody);
                requestMap.put("OP_CODE", "json_GEorderCenter_otherService_attachmentPreview");
                InfServiceHelper.adaptGray(requestMap, param);
                logger.info("------------------预览链接获取信息入参："+JSONObject.toJSONString(requestMap));
                String data;
                if (KiteStringUtils.isEqual(mode, "http")) {
                    data = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
                }
                else {
                    InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
                    data = infExchangeService.exchange(new JSONObject(requestMap));
                }
                logger.info("------------------预览链接获取信息出参："+data);
                if (KiteStringUtils.isEmpty(data)) {
                    ErrorConsts.BUSI_COMMON_ERROR.throwOut("预览链接获取失败");
                }
                Map<?, ?> result = LocalTokenUtil.checkRespParamAndGetObject(data, "ATTACHMENT_PREVIEW_RSP", Map.class);
                if (!KiteStringUtils.equals(KiteMapUtils.getString(result, "code"), LocalInfConsts.UNI_BSS_BODY_RESULT_SUCCESS)) {
                    ErrorConsts.BUSI_COMMON_ERROR.throwOut(KiteMapUtils.getString(result, "message"));
                }
                return KiteMapUtils.getString(resUrl, "data");
                */
                return resUrl;
            } else {
                ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "FTP获取文件失败", "FTP上文件为空！");
            }
        } catch (Exception e) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "获取文件预览链接失败", e.getMessage());
        } finally {
            if (ftpUtil != null) {
                ftpUtil.sftpClose();
                ftpUtil.sessionClose();
            }
        }
        return "";
    }

    @Override
    public Map<String, Object> queryGroupMemberUserInfo(Map inParamMap) {
        Map<String, Object> uniBssBodyMap = new HashMap<>();
        uniBssBodyMap.put("QryGrpMemberInfoReq", inParamMap);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("UNI_BSS_BODY", inParamMap);
        requestMap.put("OP_CODE", "QryGrpMemberInfo");
        JSONObject.toJSONString(requestMap);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut("QryGrpMemberInfo",LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败");
        }
        List<String> operationsSpecialist = new ArrayList<>();
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        String resultCode = (String) resultMap.get("RESP_CODE");
        if ("0000".equals(resultCode)) {
            return (Map<String, Object>) resultMap.get("memUserInfo");
        } else {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("QryGrpMemberInfo","用户不存在，请检查电信类型是否正确");
        }
        return null;
    }

    @Override
    public void insertAreaInfoBatch(String areaLevel) {
        List<UnicomRegion> batchQryAreaInfos = new ArrayList<UnicomRegion>();
        List<Map<String, Object>> areaLists = new ArrayList();
        Map<String, Object> parm = new HashMap<>();
        parm.put("PAGE_SIZE", 10000); //必填 每页显示条数
        parm.put("PAGE_NUM", 1); //必填 第几页
        parm.put("QRY_TYPE", "1"); //必填 1：查询全部区域 2：根据区域编码查询
        parm.put("AREA_LEVEL", areaLevel); //其中0-全国,10-省,20-地市(地州)
        parm.put("STATUS_CD", "0"); // 有效标记 空：查全部 0-有效,1-失效/注销

        Map<String, Object> uniBssBodyMap = new HashMap<>();
        uniBssBodyMap.put("BATCH_QRY_AREA_INFO_REQ", parm);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("UNI_BSS_BODY", uniBssBodyMap);
        requestMap.put("OP_CODE", "QryAreaInfo");
        InfServiceHelper.adaptGray(requestMap, requestMap);
        String result;
        // 调接口查询区域信息
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        List<String> operationsSpecialist = new ArrayList<>();
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        Map<String, Object> uniBssBody = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
        Map<String, Object> batchQryAreaInfoRsp = (Map<String, Object>) uniBssBody.get("BATCH_QRY_AREA_INFO_RSP");
        String resultCode = (String) batchQryAreaInfoRsp.get("RESULT_CODE");
        if ("0".equals(resultCode)) {
            areaLists = (List<Map<String, Object>>) batchQryAreaInfoRsp.get("DATA_LIST");
            for (int i = 0; i < areaLists.size(); i++) {
                Map<String, Object> stringObjectMap = areaLists.get(i);
                Object upRegionCode = stringObjectMap.get("LOCATION_ID");
                Long regionId = Long.parseLong(upRegionCode.toString());
                String regionCode = (String) stringObjectMap.get("AREA_CODE");
                String regionName = (String) stringObjectMap.get("AREA_NAME");
                String parRegionCode = (String) stringObjectMap.get("PARENT_AREA_CODE");
                Object upRegionLevel = stringObjectMap.get("AREA_LEVEL");
                Integer regionLevel = Integer.parseInt(upRegionLevel.toString());
                // 把值存放到List
                UnicomRegion batchQryAreaInfo = new UnicomRegion();
                batchQryAreaInfo.setRegionId(regionId);
                batchQryAreaInfo.setRegionCode(regionCode);
                batchQryAreaInfo.setRegionName(regionName);
                batchQryAreaInfo.setParRegionCode(parRegionCode);
                batchQryAreaInfo.setRegionLevel(regionLevel);
                batchQryAreaInfo.setStatusCd("1000");
                SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");//设置日期格式
                batchQryAreaInfo.setRemark("新增时间:" + df.format(new Date()));
                batchQryAreaInfos.add(batchQryAreaInfo);
            }
            IUnicomRegionService unicomRegionService = KiteSpringUtils.getBeanHighPriority(IUnicomRegionService.class);
            // 先删除表记录
            unicomRegionService.deleteInfAreaInfoBatch(areaLevel);
            // 批量插入
            unicomRegionService.insertInfAreaInfoBatch(batchQryAreaInfos);
        } else {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("QryAreaInfo","查询错误");
        }
    }

    @Override
    public PageInfo<SaleManageDTO> querySalesPerson(String staffId, String channelId, String name, String origDomain, String productType, int pageNum, int pageSize) {
        Map inParams = new HashMap();
        inParams.put("staffId", staffId);
        inParams.put("channelId", channelId);
        inParams.put("name", name);
        inParams.put("staffId", staffId);
        inParams.put("origDomain", origDomain);
        inParams.put("productType", productType);

        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("SALESMANAGERQRY_REQ", inParams);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_sh31_convergentPlatforms_salesmanagerqry");
        InfServiceHelper.adaptGray(request, inParams);
        String result;
        List<SaleManageDTO> retList = new ArrayList<>();

        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isEmpty(result)) {
            ErrorConsts.INF_INVOKE_ERROR
                .throwOut(LocalCallClientEnum.QRY_SALE_MANAGER.getServiceCode(), "查询销售经理失败", "");
        }
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        Map<String, Object> body = (Map) resultMap.get("UNI_BSS_BODY");
        Map<String, Object> rspSaleManageInfo = (Map) body.get("SALESMANAGERQRY_RSP");

        if ("0000".equals(KiteMapUtils.getString(rspSaleManageInfo, "respCode"))) {
            List<Map> saleManagerList = (List<Map>) rspSaleManageInfo.get("saleManagerList");
            saleManagerList.stream()
                .forEach(mge -> retList.add((SaleManageDTO) KiteMapUtils.mapToBean(mge, SaleManageDTO.class)));
        }
        Integer total = retList.size();
        return PageInfoUtils.coverToPageTotal(retList, pageNum, pageSize, total);
    }

    @Override
    public List<Map<String, Object>> queryHandlerInfo(Map<String, Object> map) {
        List<Map<String, Object>> resultLists = new ArrayList<>();
        Map<String, Object> parm = new HashMap<>();
        parm.put("LAST_TYDM", KiteMapUtils.getString(map, "LAST_TYDM")); //必填 政企自然客户-统一社会信用代码（后六位）
        parm.put("AREA", KiteMapUtils.getString(map, "AREA")); //必填 省分

        Map<String, Object> uniBssBodyMap = new HashMap<>();
        uniBssBodyMap.put("QRY_NATURE_CUST_AUTH_INFO_REQ_BEAN", parm);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("UNI_BSS_BODY", uniBssBodyMap);
        requestMap.put("OP_CODE", "json_chinaUnicom_govEnterprise_NatureCustElectronicFileApi_qryNatureCustAuthInfo");
        InfServiceHelper.adaptGray(requestMap, requestMap);
        String result;
        // 调接口查询经办人信息
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        List<String> operationsSpecialist = new ArrayList<>();
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        Map<String, Object> uniBssBody = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
        Map<String, Object> qryNatureCustAuthInfoRsqBean = (Map<String, Object>) uniBssBody.get("QRY_NATURE_CUST_AUTH_INFO_RSQ_BEAN");
        String resultCode = (String) qryNatureCustAuthInfoRsqBean.get("RESP_CODE");
        String resultMsg = (String) qryNatureCustAuthInfoRsqBean.get("RESP_DESC");
        if ("0000".equals(resultCode)) {
            List<Map<String, Object>> handlerLists = (List<Map<String, Object>>) qryNatureCustAuthInfoRsqBean.get("NATURE_CUST_INFOS");
            if (KiteListUtils.isNotEmpty(handlerLists)) {
                Map<String, Object> resultHandlerMap = new HashMap<>();
                List<Map> fileLogs = new ArrayList<>();
                for (Map handlerList : handlerLists) {
                    List<Map<String, Object>> electronicFiles = (List<Map<String, Object>>) handlerList.get("ELECTRONIC_FILES");
                    if (KiteListUtils.isNotEmpty(electronicFiles)) {
                        for (Map<String, Object> electronicFile : electronicFiles) {
                            Map<String, Object> handlerElectronicFileDTO = new HashMap<>();
                            // 来源 0 前端上传 1 引用客户中心
                            handlerElectronicFileDTO.put("source", "1");
                            // 取出自然客户ID、自然客户名称
                            handlerElectronicFileDTO.put("custId", (Integer) handlerList.get("NATURE_CUST_ID"));
                            handlerElectronicFileDTO.put("custName", (String) handlerList.get("NATURE_CUST_NAME"));
                            // 取出经办人名称、经办人证件号码、经办人证件类型、电子档案ID
                            handlerElectronicFileDTO.put("certName", (String) electronicFile.get("NAME"));
                            handlerElectronicFileDTO.put("certNum", (String) electronicFile.get("CERT_NUM"));
                            String agentCertType = (String) electronicFile.get("AGENT_CERT_TYPE");
                            // 经办人证件类型转换
                            String certType = DcPublicCache.getCodea("20210615001", agentCertType);
                            handlerElectronicFileDTO.put("certType", certType);
                            handlerElectronicFileDTO.put("custInfoId", (Integer) electronicFile.get("NATURE_CUST_ID"));
                            fileLogs = (List<Map>) electronicFile.get("FILE_LOGS");
                            // 经办人附件类型转换
                            for (Map fileLog : fileLogs) {
                                String attachCertType = KiteMapUtils.getString(fileLog, "CERT_TYPE");
                                attachCertType = DcPublicCache.getCodea("20210617001", attachCertType);
                                fileLog.put("CERT_TYPE", attachCertType);
                            }
                            handlerElectronicFileDTO.put("fileLogs", fileLogs);
                            resultLists.add(handlerElectronicFileDTO);
                        }
                    }
                }
                return resultLists;
            }
        } else if ("0001".equals(resultCode)) {
            Map<String, Object> resultHandlerMap = new HashMap<>();
            resultHandlerMap.put("resultCode", resultCode);
            resultHandlerMap.put("resultMsg", resultMsg);
            resultLists.add(resultHandlerMap);
            return resultLists;
        } else {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_chinaUnicom_govEnterprise_NatureCustElectronicFileApi_qryNatureCustAuthInfo","查询错误");
        }
        return resultLists;
    }

    @Override
    public Map<String, Object> queryHandlerFile(String fileKey) {
        Map<String, Object> handlerFileInfo = new HashMap<>();
        Map<String, Object> parm = new HashMap<>();
        parm.put("FILE_KEY", fileKey); //必填 Oss服务文件ID

        Map<String, Object> uniBssBodyMap = new HashMap<>();
        uniBssBodyMap.put("REQ", parm);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("UNI_BSS_BODY", uniBssBodyMap);
        requestMap.put("OP_CODE", "json_jike_NatureCustElectronicFileApi_qryAuthInfoDownFile");
        InfServiceHelper.adaptGray(requestMap, requestMap);
        String result;
        // 调接口查询附件信息
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        List<String> operationsSpecialist = new ArrayList<>();
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        Map<String, Object> uniBssBody = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
        handlerFileInfo = (Map<String, Object>) uniBssBody.get("RSP");
        return handlerFileInfo;
    }

    @Override
    public PageInfo<Map<String, Object>> queryOppoInfo(Map<String, Object> map) {
        PageInfo<Map<String, Object>> pageInfo = new PageInfo<>();

        List<Map<String, Object>> oppoInfoLists = new ArrayList<>();
        Map<String, Object> parm = new HashMap<>();
        parm.put("page", KiteMapUtils.getValue(map, "page")); //必填 当前页码
        parm.put("custId", KiteMapUtils.getString(map, "custId"));
        parm.put("oppoNumber", KiteMapUtils.getString(map, "oppoNumber"));
        parm.put("oppoName", KiteMapUtils.getString(map, "oppoName"));
        parm.put("size", KiteMapUtils.getValue(map, "pageSize"));
        Map<String, Object> uniBssBodyMap = new HashMap<>();
        uniBssBodyMap.put("MY_OPPO_REQ", parm);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("UNI_BSS_BODY", uniBssBodyMap);
        requestMap.put("OP_CODE", "json_chinaUnicom_govEnterprise_innovationHeadlines_myOppo");
        InfServiceHelper.adaptGray(requestMap, requestMap);
        String result;
        // 调接口查询信息
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        List<String> operationsSpecialist = new ArrayList<>();
        Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
        Map<String, Object> uniBssBody = KiteMapUtils.getValue(resultMap, "UNI_BSS_BODY");
        Map<String, Object> myOppoRsp = KiteMapUtils.getValue(uniBssBody, "MY_OPPO_RSP");
        if (KiteStringUtils.equals("10000", KiteMapUtils.getString(myOppoRsp, "code"))) {
            Map<String, Object> data = KiteMapUtils.getValue(myOppoRsp, "data");
            List<Map> oppoLists = JsonUtils.parseArray(KiteMapUtils.getString(data, "list"), Map.class);
            if (KiteListUtils.isNotEmpty(oppoLists)) {
                for (Map oppoList : oppoLists) {
                    Map oppoMap = new HashMap();
                    String createDate = KiteMapUtils.getString(oppoList, "creatDate");
                    Map<String, Object> oppoOppoVo = (Map<String, Object>) oppoList.get("oppoOppoVo");
                    String creatorName = KiteMapUtils.getString(oppoOppoVo, "creatorName");
                    String oppoNumber = KiteMapUtils.getString(oppoOppoVo, "oppoNumber");
                    String oppoName = KiteMapUtils.getString(oppoOppoVo, "oppoName");
                    oppoMap.put("oppoName", oppoName);
                    oppoMap.put("oppoNumber", oppoNumber);
                    oppoMap.put("creatorName", creatorName);
                    oppoMap.put("creatDate", createDate);
                    oppoInfoLists.add(oppoMap);
                }
                pageInfo.setList(oppoInfoLists);
                pageInfo.setTotal(KiteMapUtils.getLongValue(data, "totalCount"));
                pageInfo.setPageNum(KiteMapUtils.getIntValue(data, "pageNo"));
                pageInfo.setPageSize(KiteMapUtils.getIntValue(data, "pageSize"));
                pageInfo.setPages(KiteMapUtils.getIntValue(data, "totalPage"));
                return pageInfo;
            }
        }
        return pageInfo;
    }

    @Override
    public Map<String, Object> qryGrpMemberListByGrp(String custId) {

        Map<String, Object> req = new HashMap<>();
        req.put("CUR_PAGE", 1);
        req.put("PAGE_SIZE", 10);
        req.put("PRIMARY_USER_ID", Long.parseLong(custId));

        //tcp_cont
        Map<String, String> tcpContMap = new HashMap<String, String>();
        tcpContMap.put("APP_KEY", LocalInfConsts.APP_ID);
        tcpContMap.put("TRANS_ID", LocalTokenUtil.getTransId());
        req.put("TCP_CONT", tcpContMap);

        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("REQ", req);

        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_GEuserCenter_SalBusaGrpMemberSerApi_qryGrpMemberListByGrp");
        InfServiceHelper.adaptGray(request, req);

        String result;
        String property = PropertiesUtil.getProperty("interface.call.mode");
        if (KiteStringUtils.isEqual(property, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        Map<String, Object> resultObject = new HashMap<>();
        if (KiteStringUtils.isNotEmpty(result)) {
            Map resultMap = JSON.parseObject(result, Map.class);
            if (KiteMapUtils.isNotEmpty(resultMap)) {
                Map<String, Object> uniBssBodyMap = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
                if (KiteMapUtils.isNotEmpty(uniBssBodyMap)) {
                    Map<String, Object> rsp = (Map<String, Object>) uniBssBodyMap.get("RSP");
                    if (KiteStringUtils.equals(KiteMapUtils.getString(rsp, "RESULT_CODE"), "0000")) {
                        resultObject = (Map<String, Object>) rsp.get("RESULT_OBJECT");
                    }
                }
            }
        }
        return resultObject;
    }

    private Map<String, Object> getMemberListByGrp(Map memberListByGrp) {
        Map<String, Object> uniBssBody = (Map<String, Object>) memberListByGrp.get("UNI_BSS_BODY");
        if (KiteMapUtils.isEmpty(uniBssBody)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_GEuserCenter_SalBusaGrpMemberSerApi_qryGrpMemberListByGrp","返回报文缺少UNI_BSS_BODY节点");
        }
        Map<String, Object> rsp = (Map<String, Object>) uniBssBody.get("RSP");
        if (!KiteStringUtils.equals(KiteMapUtils.getString(rsp, "RESULT_CODE"), "0000")) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_GEuserCenter_SalBusaGrpMemberSerApi_qryGrpMemberListByGrp",KiteMapUtils.getString(rsp, "RESULT_MSG"));
        }
        Map<String, Object> resultObject = (Map<String, Object>) rsp.get("RESULT_OBJECT");
        if (KiteMapUtils.isEmpty(resultObject)) {
            ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_GEuserCenter_SalBusaGrpMemberSerApi_qryGrpMemberListByGrp",KiteMapUtils.getString(rsp, "RESULT_MSG"));
        }
        return resultObject;
    }

    @Override
    public Map<String, Object> qryGrpMemberListByGrpNew(QryGrpMemberListByGrpReq qryGrpMemberListByGrpReq) {
        Map<String, Object> req = new HashMap<>();
        String pageNum = KiteStringUtils.valueOf(qryGrpMemberListByGrpReq.getCurPage());
        String pageSize = KiteStringUtils.valueOf(qryGrpMemberListByGrpReq.getPageSize());
        pageNum = KiteStringUtils.isNotEmpty(pageNum) ? pageNum : "1";
        pageSize = KiteStringUtils.isNotEmpty(pageSize) ? pageSize : "10";
        Integer intpageNum = Integer.parseInt(pageNum);
        Integer intPageSize = Integer.parseInt(pageSize);
        if (KiteStringUtils.isNotEmpty(qryGrpMemberListByGrpReq.getPrimaryUserId())) {
            req.put("PRIMARY_USER_ID", Long.parseLong(qryGrpMemberListByGrpReq.getPrimaryUserId()));
        }
        if(KiteStringUtils.isNotEmpty(qryGrpMemberListByGrpReq.getPrimarySerialNumber())) {
            req.put("PRIMARY_SERIAL_NUMBER", qryGrpMemberListByGrpReq.getPrimarySerialNumber());
        }
        if(KiteStringUtils.isNotEmpty(qryGrpMemberListByGrpReq.getMemSerialNumber())) {
            req.put("MEM_SERIAL_NUMBER", qryGrpMemberListByGrpReq.getMemSerialNumber());
        }
        if(KiteStringUtils.isNotEmpty(qryGrpMemberListByGrpReq.getPrimaryProvinceCode())) {
            req.put("PRIMARY_PROVINCE_CODE", qryGrpMemberListByGrpReq.getPrimaryProvinceCode());
        }
        if(KiteStringUtils.isNotEmpty(qryGrpMemberListByGrpReq.getPrimaryEparchyCode())) {
            req.put("PRIMARY_EPARCHY_CODE", qryGrpMemberListByGrpReq.getPrimaryEparchyCode());
        }

        req.put("FINISH_STATE", LocalKeyConsts.GROUP_RELATION_FINISH_STATE_1);
        req.put("QUERY_OLD_SYSTEM", qryGrpMemberListByGrpReq.getQueryOldSystem());
        req.put("CUR_PAGE", intpageNum);
        req.put("PAGE_SIZE", intPageSize);
        //tcp_cont
        Map<String, String> tcpContMap = new HashMap<String, String>();
        tcpContMap.put("APP_KEY", LocalInfConsts.APP_ID);
        tcpContMap.put("TRANS_ID", LocalTokenUtil.getTransId());
        req.put("TCP_CONT", tcpContMap);

        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("REQ", req);

        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_GEuserCenter_SalBusaGrpMemberSerApi_qryGrpMemberListByGrp");
        InfServiceHelper.adaptGray(request, req);

        String result;
        String property = PropertiesUtil.getProperty("interface.call.mode");
        if (KiteStringUtils.isEqual(property, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        Map<String, Object> resultObject = new HashMap<>();
        if (KiteStringUtils.isNotEmpty(result)) {
            Map resultMap = JSON.parseObject(result, Map.class);
            if (KiteMapUtils.isNotEmpty(resultMap)) {
                Map<String, Object> uniBssBodyMap = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
                if (KiteMapUtils.isNotEmpty(uniBssBodyMap)) {
                    Map<String, Object> rsp = (Map<String, Object>) uniBssBodyMap.get("RSP");
                    if (KiteStringUtils.equals(KiteMapUtils.getString(rsp, "RESULT_CODE"), "0000")) {
                        resultObject = (Map<String, Object>) rsp.get("RESULT_OBJECT");
                    }
                }
            }
        }
        return resultObject;
    }
    @Override
    public Map<String, Object> createAndUploadContract(ContractRequestDTO contractRequestDTO) {
        Map<String, Object> CREATEFMTCONTRACTINFO_REQ = new HashMap<>();
        Map<String, Object> CREATEFMTCONTRACTINFO_REQ_BODY = new HashMap<>();
        CREATEFMTCONTRACTINFO_REQ_BODY.put("OPERATION_STATE","1");
        CREATEFMTCONTRACTINFO_REQ_BODY.put("PHONE_NUMBER",ContextUtil.getLoginInfo().getUserInfo().getExtParams().get("phone"));
        CREATEFMTCONTRACTINFO_REQ_BODY.put("COMPANY_ID",contractRequestDTO.getCompanyId());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("COMPANY_NAME",contractRequestDTO.getCompanyName());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_NAME",contractRequestDTO.getContractName());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_TYPE",contractRequestDTO.getContractType());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_NUMBER",contractRequestDTO.getContractNumber());
        //CREATEFMTCONTRACTINFO_REQ_BODY.put("OLD_CONTRACT_NUMBER","1");//老合同编号，用于变更关联合同时必填
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_DRAFTERS",contractRequestDTO.getContractDrafters());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_EXECUTOR",contractRequestDTO.getContractExecutor());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("IS_FIXEDMONEY","1");
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_SUM",contractRequestDTO.getContractSum());
        //CREATEFMTCONTRACTINFO_REQ_BODY.put("CON_REC_NO",null);
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_CURRENCY","CNY");
        //CREATEFMTCONTRACTINFO_REQ_BODY.put("CONTRACT_NOTE","1");
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CUST_NAME",contractRequestDTO.getCustName());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CUST_ID",contractRequestDTO.getCustId());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CUST_CODE",contractRequestDTO.getCustCode());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("CUST_TYPE",contractRequestDTO.getCustType());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("OPER_NO",ContextUtil.getLoginInfo().getStaffInfo().getStaffCode());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("OPER_NAME",ContextUtil.getLoginInfo().getStaffInfo().getStaffName());
        CREATEFMTCONTRACTINFO_REQ_BODY.put("PROVINCE_CODE",ContextUtil.getLoginInfo().getUserInfo().getPostProvinceNbr());
        //CREATEFMTCONTRACTINFO_REQ_BODY.put("CITY_CODE","1");
        //CREATEFMTCONTRACTINFO_REQ_BODY.put("COUNTY_CODE","1");
        CREATEFMTCONTRACTINFO_REQ_BODY.put("DEPART_ID",ContextUtil.getLoginInfo().getUserInfo().getExtParams().get("deptId"));
        CREATEFMTCONTRACTINFO_REQ_BODY.put("DEPART_NAME","1");
        CREATEFMTCONTRACTINFO_REQ_BODY.put("STATUS_CODE","305");
        List ATTACHMENTS=new ArrayList();
        String ACCESSORY_ID = KiteStringUtils.substring(contractRequestDTO.getFlowId(), 0,
            KiteStringUtils.lastIndexOf(contractRequestDTO.getFlowId(), "*_*"));
        String ACCESSORY_NAME = KiteStringUtils.substring(contractRequestDTO.getFlowId(),
        KiteStringUtils.lastIndexOf(contractRequestDTO.getFlowId(), "*_*")+3);
        String[] ac = ACCESSORY_ID.split("\\|");
        String[] an = ACCESSORY_NAME.split("\\|");
        for (int i = 0; i < ac.length; i++) {
            Map  ATTACHMENT=new HashMap();
            // url包含"*_*"的直接取上面切分好的名称,否则说明url是用"|"分隔的多个附件,那么按照切分的url动态解析
            ATTACHMENT.put("ACCESSORY_ID",ac[i]);
            ATTACHMENT.put("ACCESSORY_NAME",an[i]);
            ATTACHMENTS.add(ATTACHMENT);
        }
        CREATEFMTCONTRACTINFO_REQ_BODY.put("ATTACHMENTS",ATTACHMENTS);
        /*  CREATEFMTCONTRACTINFO_REQ_BODY.put("ACCESSORY_ID",contractRequestDTO.getFlowId());
         */
        CREATEFMTCONTRACTINFO_REQ.put("CREATEFMTCONTRACTINFO_REQ_BODY",CREATEFMTCONTRACTINFO_REQ_BODY);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("CREATEFMTCONTRACTINFO_REQ", CREATEFMTCONTRACTINFO_REQ);
        Map<String, Object> request = new HashMap<>();
        request.put("UNI_BSS_BODY", uniBssBody);
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_marketingCenter_createFMTContractInfoSer");
        InfServiceHelper.adaptGray( request, CREATEFMTCONTRACTINFO_REQ_BODY);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        Map<String, Object> resultObject = new HashMap<>();
        if (KiteStringUtils.isNotEmpty(result)) {
            Map resultMap = JSON.parseObject(result, Map.class);
            if (KiteMapUtils.isNotEmpty(resultMap)) {
                Map<String, Object> uniBssBodyMap = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
                if (KiteMapUtils.isNotEmpty(uniBssBodyMap)) {
                    Map<String, Object> rsp = (Map<String, Object>) uniBssBodyMap.get("CREATEFMTCONTRACTINFO_RSP");
                    if (KiteStringUtils.equals(KiteMapUtils.getString(rsp, "RSP_CODE"), "0000")) {
                        resultObject = (Map<String, Object>) rsp.get("FMTCONTRACTINFOADD_RSP_BODY");
                    }else{
                        ErrorConsts.INF_INVOKE_EXCEPTION.throwOut("json_chinaUnicom_govEnterprise_marketingCenter_createFMTContractInfoSer",KiteMapUtils.getString(rsp, "RSP_DETAIL"));
                    }
                }
            }
        }
        return resultObject;
    }

    @Override
    public Map<String, Object> queryJudgeResources(String orderId) {
        Map<String, Object> resultObject = new HashMap<>();
        Map<String, Object> parm = new HashMap<>();
        parm.put("orderId", orderId);
        parm.put("APP_ID", LocalInfConsts.APP_ID);

        Map<String, Object> uniBssBodyMap = new HashMap<>();
        uniBssBodyMap.put("JUDGE_RESOURCES_REQ", parm);
        Map<String, Object> requestMap = LocalTokenUtil.getParamMap(uniBssBodyMap);
        requestMap.put("UNI_BSS_BODY", uniBssBodyMap);
        requestMap.put("OP_CODE", "json_chinaUnicom_govEnterprise_orderCenter_judgeResources");
        InfServiceHelper.adaptGray(requestMap, requestMap);
        String result;
        // 调接口查询信息
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(requestMap));
        }
        if (KiteStringUtils.isBlank(result)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败", "");
        }
        List<String> operationsSpecialist = new ArrayList<>();
        Map<String, Object> resultMap = new HashMap<>();
        Map<String, Object> uniBssBody = new HashMap<>();
        try{
            resultMap = JSON.parseObject(result, Map.class);
            uniBssBody = (Map<String, Object>) resultMap.get("UNI_BSS_BODY");
        }catch (Exception e){
            ErrorConsts.INF_INVOKE_ERROR.throwOut("json_chinaUnicom_govEnterprise_orderCenter_judgeResources",LocalCallClientEnum.INF_COMMON_URL.getServiceCode(), "查询失败");
        }
        Map<String, Object> judgeResourcesRsp = (Map<String, Object>) uniBssBody.get("JUDGE_RESOURCES_RSP");
        return judgeResourcesRsp;
    }

    @Override
    public List<Map<String, Object>> queryRegion(String parentAreaCode, String locationType) {
        Map<String, Object> requestMap = new HashMap<>();
        Map<String, Object> uniBssBody = new HashMap<>();
        Map<String, Object> domesticPoliticalLocation = new HashMap<>();
        Map<String, Object> tcpCont = new HashMap<>();
        // 系统来源 H：销售
        tcpCont.put("APP_KEY", "H");
        domesticPoliticalLocation.put("TCP_CONT", tcpCont);
        domesticPoliticalLocation.put("LOCATION_TYPE", locationType);
        domesticPoliticalLocation.put("PARENT_AREA_CODE", parentAreaCode);
        uniBssBody.put("QUERY_REGION_REQ", domesticPoliticalLocation);
        requestMap.put("UNI_BSS_BODY", uniBssBody);
        requestMap.put("OP_CODE", "QUERY_REGION");
        InfServiceHelper.adaptGray(requestMap, domesticPoliticalLocation);
        String respStr;
        if (CallClientUtils.callByHttp()) {
            respStr = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            respStr = infExchangeService.exchange(new JSONObject(requestMap));
        }

        Map<String, Object> respMap = JSON.parseObject(respStr, Map.class);
        Map headMap = MapUtils.getMap(respMap, "UNI_BSS_HEAD");
        if(!"00000".equals(MapUtils.getString(headMap, "RESP_CODE"))) {
            logger.warn("应用系统区域查询服务(国内)接口失败：{}", MapUtils.getString(headMap, "RESP_DESC"));
            return null;
        }

        Map respBody = MapUtils.getMap(respMap, "UNI_BSS_BODY");
        Map queryRegionRsp = MapUtils.getMap(respBody, "QUERY_REGION_RSP");
        if(!"00000".equals(MapUtils.getString(queryRegionRsp, "CODE"))) {
            logger.warn("应用系统区域查询服务(国内)接口失败：{}", MapUtils.getString(queryRegionRsp, "MESSAGE"));
            return null;
        }
        List<Map<String, Object>> list = CommonUtil.getList(queryRegionRsp, "DATA");
        return list;
    }



    /**
     * 调用订单中心接口的时候需要传递登录工号人员的姓名、联系方式、工号给订单中心
     */
    private Map<String,Object> acceptStaffReplenish(Map<String,Object>businessData){
        UserInfo userInfo = ContextUtil.getLoginInfo().getUserInfo();
        Map<String,Object> accept = MapUtils.getMap(businessData,"accept");
        if(null==accept){
            accept = new HashMap<>();
            businessData.put("accept",accept);
        }
        accept.put("sourceMallMobilePhone",null==userInfo.getExtParams().get("phone")?"":userInfo.getExtParams().get("phone"));//触点工号联系方式
        if(userInfo.getUserId() != null) {
            accept.put("sourceMallStaffId", String.valueOf(userInfo.getUserId()));//触点工号
        }
        accept.put("sourceMallStaffName",userInfo.getUserName());//触点工号名称

        return businessData;
    }
    /**
     * 调用订单中心接口的时候需要传递登录工号人员的姓名、联系方式、工号给订单中心
     * 处理归集接口
     */
    private Map<String,Object> acceptStaffReplenishForPathVariable(Map<String,Object>requestMap){
        UserInfo userInfo = ContextUtil.getLoginInfo().getUserInfo();
        Map<String,Object> accept = MapUtils.getMap(requestMap,"ACCEPT");
        if(null==accept){
            accept = new HashMap<>();
            requestMap.put("ACCEPT",accept);
        }
        accept.put("SOURCE_MALL_MOBILE_PHONE".toUpperCase(),null==userInfo.getExtParams().get("phone")?"":userInfo.getExtParams().get("phone"));//触点工号联系方式
        if(userInfo.getUserId() != null) {
            accept.put("SOURCE_MALL_STAFF_ID", String.valueOf(userInfo.getUserId()));//触点工号
        }
        accept.put("SOURCE_MALL_STAFF_NAME",userInfo.getUserName());//触点工号名称

        return requestMap;
    }

    /**
     * 根据集客工号查询对应的组织、区域信息服务
     * @param qryGovUserCodeReqDTO
     * @return
     */
    @Override
    public GovUserCodeRspDTO qryGovUserInfo(QryGovUserCodeReqDTO qryGovUserCodeReqDTO) {
        Map<String, Object> qryGovUserCodeReqMap = HumpToLine(qryGovUserCodeReqDTO);
        Map<String, Object> uniBssBody = new HashMap();
        uniBssBody.put("QUERY_GOV_USER_BY_CODE_REQ", qryGovUserCodeReqMap);
        Map<String, Object> param = new HashMap<>();
        param.put("UNI_BSS_BODY", uniBssBody);
        param.put("OP_CODE", "json_chinaUnicom_govEnterprise_operationPlatform_queryGovUserByCode");
        InfServiceHelper.adaptGray(param, qryGovUserCodeReqMap);
        String resultStr;
        if (KiteStringUtils.isEqual(mode, "http")) {
            resultStr = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, param, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            resultStr = infExchangeService.exchange(new JSONObject(param));
        }
        if (KiteStringUtils.isEmpty(resultStr)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut("json_chinaUnicom_govEnterprise_operationPlatform_queryGovUserByCode", "根据集客工号查询对应的组织、区域信息服务",
                "根据集客工号查询对应的组织、区域信息服务失败");
        }
        Map<String, Object> respMap = JSON.parseObject(resultStr, Map.class);
        Map<String, Object> headMap = KiteMapUtils.getMap(respMap, "UNI_BSS_HEAD");
        if(!"00000".equals(KiteMapUtils.getString(headMap, "RESP_CODE"))) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut("json_chinaUnicom_govEnterprise_operationPlatform_queryGovUserByCode", "根据集客工号查询对应的组织、区域信息服务",
                "根据集客工号查询对应的组织、区域信息服务失败" + MapUtils.getString(headMap, "RESP_DESC"));
        }
        Map<String, Object> uniBssBodyResult = MapUtils.getMap(respMap, "UNI_BSS_BODY");
        Map<String, Object> govUserInfoMap = KiteMapUtils.getMap(uniBssBodyResult, "QUERY_GOV_USER_BY_CODE_RSP");
        String rspCode = KiteMapUtils.getString(govUserInfoMap, "RESP_CODE");
        GovUserCodeRspDTO govUserCodeRspDTO = new GovUserCodeRspDTO();
        if ("0000".equals(rspCode)) {
            govUserCodeRspDTO = JSONObject.parseObject(JSON.toJSONString(govUserInfoMap), GovUserCodeRspDTO.class);
        }
        return govUserCodeRspDTO;
    }

    @Override
    public String findoopOrderList(KiteCartFindoopOrderReqDTO reqDTO) {
        String resultStr;
        Map<String, Object> findOOPOrderListReq = new HashMap<>();

//        reqDTO.setBeforeLastCategoryId(40004001L);
//        reqDTO.setGoodsId(40004001L);
//        reqDTO.setCustId(1120120237540081L);
        findOOPOrderListReq.put("pageNo", reqDTO.getPageNo());
        findOOPOrderListReq.put("pageSize", reqDTO.getPageSize());
        findOOPOrderListReq.put("goodsId", reqDTO.getGoodsId());
        findOOPOrderListReq.put("custId", reqDTO.getCustId());
        findOOPOrderListReq.put("goodsId", reqDTO.getGoodsId());
        findOOPOrderListReq.put("beforeLastCategoryId", reqDTO.getBeforeLastCategoryId());

        findOOPOrderListReq.put("applyName", reqDTO.getApplyName());
        findOOPOrderListReq.put("applyCode", reqDTO.getApplyCode());
        findOOPOrderListReq.put("applyType", reqDTO.getApplyType());
        findOOPOrderListReq.put("oopCode", reqDTO.getOopCode());
        findOOPOrderListReq.put("createTimeStart", reqDTO.getCreateTimeStart());
        findOOPOrderListReq.put("createTimeEnd", reqDTO.getCreateTimeEnd());

        //商品目录id
//        findOOPOrderListReq.put("goodsClassId","");
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("queryListReq", findOOPOrderListReq);
        Map<String, Object> param = LocalTokenUtil.getParamMap(uniBssBody);
        param.put("OP_CODE", "json_chinaUnicom_govEnterprise_marketingCenter_queryList");
        String req=JSON.toJSONString(param);
        System.out.println(req);
        String result;
        if (KiteCartStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, param, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(param));
        }
        return result;
    }

    /**
     * 查询VPN服务信息详情
     * @param reqDTO
     * @return
     */
    @Override
    public List findVpnBusinessNamesList(VpnServiceReqDTO reqDTO){
        Map<String, Object> requestMap = new HashMap<>();
        Map uniBssBody = new HashMap();
        uniBssBody.put("VPN_SERVICE_REQ", reqDTO);

        requestMap.put("UNI_BSS_BODY", uniBssBody);
        requestMap.put("OP_CODE", "json_chinaUnicom_VPN_cloudNetworkingPlatform_queryVPNList");
        String respStr;
        if (KiteStringUtils.isEqual(mode, "http")) {
            respStr = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, requestMap, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            respStr = infExchangeService.exchange(new JSONObject(requestMap));
        }

        JSONObject rspJson = JSON.parseObject(respStr);

        if (rspJson == null) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut("VPN_SERVICE_REQ", "查询VPN服务信息详情", "查询VPN服务信息详情失败");
        }
        //接口异常信息提示
        Map respMap = JSON.parseObject(respStr, Map.class);
        Map headMap = MapUtils.getMap(respMap, "UNI_BSS_HEAD");
        if(!"00000".equals(MapUtils.getString(headMap, "RESP_CODE"))) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut("VPN_SERVICE_REQ", "查询VPN服务信息详情", "查询VPN服务信息详情失败,调用接口状态编码为："+MapUtils.getString(headMap, "RESP_DESC"));
        }
        // 接口数据处理
        Map respBody = MapUtils.getMap(respMap, "UNI_BSS_BODY");
        Map getVpnRsp = MapUtils.getMap(respBody, "VPN_SERVICE_RSP");
        String dataJson = getVpnRsp.get("vpnServiceCustomers").toString();
        if (dataJson == null) {
            return null;
        }
        List<Map> retList = new ArrayList<Map>();
        if (!KiteObjectUtils.isEmpty(dataJson)) {
            List<JSONObject> dataList = Optional
                .ofNullable(JSON.parseObject(dataJson, List.class)).orElse(Collections.EMPTY_LIST);
            dataList.stream().forEach(t -> {
                Map temp  = JSON.parseObject(t.toString(), Map.class);
                retList.add(temp);
            });
            return retList;
        }
        return null;
    }
    /**
     * 驼峰转下划线
     * @param object
     * @return
     */
    public static Map<String, Object> HumpToLine(Object object) {
        return JSONObject.parseObject(JsonUtils.transKeyToUpperCaseObject(JSONObject.toJSON(object).toString()).toJSONString(), Map.class);
    }

    @Override
    public String getMapAidToken(Map<String, Object> param) {
        final String TOKEN_OP_CODE = "json_chinaUnicom_networkMidPlatform_abilityGateway_tokenMiddlleplatform";
        Map<String, Object> uniBssBody = new HashMap();
        uniBssBody.put("TOKEN_MIDDLLEPLATFORM_REQ", param);
        Map<String, Object> reqParam = new HashMap<>();
        reqParam.put("UNI_BSS_BODY", uniBssBody);
        reqParam.put("OP_CODE", TOKEN_OP_CODE);
        InfServiceHelper.adaptGray(reqParam, uniBssBody);
        String resultStr;
        if (KiteStringUtils.isEqual(mode, "http")) {
            resultStr = HttpsCallClient.postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, reqParam, LocalTokenUtil.getHeaderMap());
        } else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            resultStr = infExchangeService.exchange(new JSONObject(reqParam));
        }
        if (KiteStringUtils.isEmpty(resultStr)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(TOKEN_OP_CODE, "鉴权服务接口",
                "鉴权服务接口调用失败");
        }
        Map<String, Object> resultMap = JSONObject.parseObject(resultStr, Map.class);
        Map headMap = MapUtils.getMap(resultMap, "UNI_BSS_HEAD");
        if(!"00000".equals(MapUtils.getString(headMap, "RESP_CODE"))) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(TOKEN_OP_CODE, "鉴权服务接口", "调用鉴权服务接口失败,调用接口状态编码为："+MapUtils.getString(headMap, "RESP_DESC"));
        }
        Map respBody = MapUtils.getMap(resultMap, "UNI_BSS_BODY");
        Map<String, Object> tokenMap = KiteMapUtils.getMap(respBody, "TOKEN_MIDDLLEPLATFORM_RSP");
        Map<String, Object> token = JSON.parseObject(KiteMapUtils.getString(tokenMap, "UNI_NET_BODY"), Map.class);
        String code = KiteMapUtils.getString(token, "code");
        String message = KiteMapUtils.getString(token, "message");
        if (!"200".equals(code)) {
            ErrorConsts.INF_INVOKE_ERROR.throwOut(TOKEN_OP_CODE, "鉴权服务接口",
                "鉴权服务接口异常：" + message);
        }
        Map<String, Object> dataMap = KiteMapUtils.getMap(token, "data");
        return KiteMapUtils.getString(dataMap, "token");
    }

    /**
     * Description: <br>
     *
     * @author tengg<br>
     * @taskId <br>
     * @param userId
     * @param userCode
     * @return <br>
     */
    @Override
    public Map<String, Object> queryChannelByUserInfo(String userId, String userCode, String prodviceCode) {
        Integer pageSize = 1;
        Map<String, Object> operUserInfo = new HashMap<>();
        operUserInfo.put("STAFF_ID", userId);
        operUserInfo.put("USER_CODE", userCode);

        Map<String, Object> batchQryChannelInfoReq = new HashMap<>();
        batchQryChannelInfoReq.put("PAGE_SIZE", pageSize);
        batchQryChannelInfoReq.put("OPER_USER_INFO", operUserInfo);
        batchQryChannelInfoReq.put("PAGE_NUM", 1);
        batchQryChannelInfoReq.put("QRY_TYPE", "2");
        batchQryChannelInfoReq.put("CONTENT_TYPE", "1");
        batchQryChannelInfoReq.put("CHNL_STATUS", "10");
        Map<String, Object> chnlLocation = new HashMap<>();
        chnlLocation.put("PROVINCE_CODE", prodviceCode);
        batchQryChannelInfoReq.put("CHNL_LOCATION", chnlLocation);
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("BATCH_QRY_CHANNEL_INFO_REQ", batchQryChannelInfoReq);

        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "BATCH_QRY_CHANNEL_INFO");
        request.put("UNI_BSS_BODY", uniBssBody);
        InfServiceHelper.adaptGray( request, batchQryChannelInfoReq);

        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> channelMap = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(channelMap, "UNI_BSS_HEAD");
            if (KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(channelMap, "UNI_BSS_BODY");
                JSONObject batchQryChannelInfoRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "BATCH_QRY_CHANNEL_INFO_RSP");
                JSONArray dataList = KiteMapUtils.getValue(batchQryChannelInfoRsp, "DATA_LIST");
                if (KiteListUtils.isNotEmpty(dataList)) {
                    Map<String, String> dataMap = (Map<String, String>) dataList.get(0);
                    JSONObject channelInfo = KiteMapUtils.getValue(dataMap, "CHANNEL_INFO");
                    return channelInfo;
                }
            }
        }
        return new HashMap<>();
    }

    @Override
    public List<JSONObject> marketCenterFileUpload(Map<String,String> reqMap, byte[] bytes) {
        Integer pageSize = 1;
        Map<String, Object> fileToStringUploadReq = new HashMap<>();
        fileToStringUploadReq.put("FILE_NAME", KiteMapUtils.getString(reqMap,"FILE_NAME"));
        fileToStringUploadReq.put("SOURCE_REQUEST", LocalInfConsts.APP_ID);
        fileToStringUploadReq.put("TRANS_ID", LocalTokenUtil.getTransId());
        fileToStringUploadReq.put("INFO_TYPE", KiteMapUtils.getString(reqMap,"INFO_TYPE"));
        //合同类型可以修改 暂时不传类型
        //fileToStringUploadReq.put("SUBINFO_TYPE", KiteMapUtils.getString(reqMap,"SUBINFO_TYPE"));
        fileToStringUploadReq.put("FILE_BODY", bytes);
        Map<String, Object> chnlLocation = new HashMap<>();
        Map<String, Object> uniBssBody = new HashMap<>();
        uniBssBody.put("FILE_TO_STRING_UPLOAD_REQ", fileToStringUploadReq);
        Map<String, Object> request = new HashMap<>();
        request.put("OP_CODE", "json_chinaUnicom_govEnterprise_marketingCenter_fileToStringUpload");
        request.put("UNI_BSS_BODY", uniBssBody);
        InfServiceHelper.adaptGray( request, fileToStringUploadReq);
        String result;
        if (KiteStringUtils.isEqual(mode, "http")) {
            result = HttpsCallClient
                .postStringWithObject(LocalCallClientEnum.INF_COMMON_URL, request, LocalTokenUtil.getHeaderMap());
        }
        else {
            InfExchangeService infExchangeService = SpringUtil.getBean("infExchangeService");
            result = infExchangeService.exchange(new JSONObject(request));
        }
        if (KiteStringUtils.isNotEmpty(result)) {
            Map<String, Object> fileMap = JSON.parseObject(result, Map.class);
            JSONObject uniBssHead = KiteMapUtils.getValue(fileMap, "UNI_BSS_HEAD");
            if (KiteObjectUtils.isEmpty(uniBssHead) || KiteStringUtils.equals(KiteMapUtils.getString(uniBssHead, "RESP_CODE"), LocalInfConsts.RESP_SUCCESS)) {
                JSONObject uniBssBodyResult = KiteMapUtils.getValue(fileMap, "UNI_BSS_BODY");
                JSONObject fileToStringUploadRsp = KiteMapUtils
                    .getValue(uniBssBodyResult, "FILE_TO_STRING_UPLOAD_RSP");
                if("0000".equals(fileToStringUploadRsp.getString("code"))){
                    List<JSONObject> dataList = (List<JSONObject>) fileToStringUploadRsp.get("data");
                    return dataList;
                }else{
                    ErrorConsts.INF_INVOKE_ERROR.throwOut("json_chinaUnicom_govEnterprise_operationPlatform_queryGovUserByCode", "营销中心合同上传接口调用失败",
                        "营销中心合同上传接口调用失败" + fileToStringUploadRsp.getString("message"));
                    ErrorConsts.INF_INVOKE_EXCEPTION.throwOut(CallClientEnum.CREATE_UPLOADCONTRACT.getServiceCode(),fileToStringUploadRsp.getString("message"));
                }
            }
        }
        return null;
    }
}
